Comments (13)
I think there has been a change in the dispatcher of the CakePHP framework itself. What version are you using?
from cakephp-user-tools.
3.1.7
from cakephp-user-tools.
So just changing all the methods from underscored to camelCased in the components map fixes the problem for you? I couldn't find anything related to that in the 3.1 changelog and I have three apps using that version without that I've noticed trouble.
from cakephp-user-tools.
Inside the UserToolComponent
'actionMap' => [
'index' => [
'method' => 'listing',
'view' => 'Burzum/UserTools.UserTools/index',
],
'register' => [
'method' => 'register',
'view' => 'Burzum/UserTools.UserTools/register'
],
'login' => [
'method' => 'login',
'view' => 'Burzum/UserTools.UserTools/login',
],
'logout' => [
'method' => 'logout',
'view' => null
],
'resetPassword' => [
'method' => 'resetPassword',
'view' => 'Burzum/UserTools.UserTools/reset_password',
],
'requestPassword' => [
'method' => 'requestPassword',
'view' => 'Burzum/UserTools.UserTools/request_password',
],
'changePassword' => [
'method' => 'changePassword',
'view' => 'Burzum/UserTools.UserTools/change_password',
],
'verifyEmail' => [
'method' => 'verifyEmailToken',
'view' => 'Burzum/UserTools.UserTools/verify_email',
],
'view' => [
'method' => 'getUser',
'view' => 'Burzum/UserTools.UserTools/view',
]
]
in my boostrap
Configure::write('UserTools.Component', [
'actionMap' => [
'index' => [
'method' => 'listing',
'view' => 'UserTools.UserTools/index',
],
'register' => [
'method' => 'register',
'view' => 'register'
],
'changePassword' => [
'method' => 'changePassword',
'view' => 'change_password'
],
'login' => [
'method' => 'login',
'view' => 'login',
],
'logout' => [
'method' => 'logout',
'view' => null
],
],
]);
that's how it works for me, I tried to access it like request-password or request_password but the $action in
public function mapAction() {
$action = $this->request->params['action'];
was always returning it camelBacked. When I changed it worked.
from cakephp-user-tools.
isn't it part of the new conventions to have actions camelBacked ?
from cakephp-user-tools.
I'm pretty sure it is because of PSR. I just can't see where I have missed that change to the CakePHP core. I've checked the release notes but haven't seen it there. With 3.0 it was working the way it is. I fear there is a difference between old and new apps. So the difference might be in the cakephp/app package, loading another dispatcher filter or something like that.
https://github.com/cakephp/app/releases
3.1.0-beta …
CakePHP App Skeleton 3.1.0-beta
* Default to DashedRoute.
from cakephp-user-tools.
@djonatanb please see
from cakephp-user-tools.
Not sure if I understand it all, but for me the problem seemed to be the action name. As far as I understand you are using action names with underscore as the key in the config array.
Are you using dashedRoute in the projects with cakephp3.0 that work ok with the underscore actions ?
from cakephp-user-tools.
@djonatanb no need to understand it, I've fixed it in a backward compatible way. Would you please mind switching to the develop
branch of the plugin for a moment? It's fixed there. After your feedback I'll tag version 1.0.3.
from cakephp-user-tools.
ok, gotcha, will do that
from cakephp-user-tools.
The routing is working for me now. Thanks, I'll see if I can implement the user registration by invitation and make a pull request at some point.
from cakephp-user-tools.
A PR for what? If you want an user registration you can re-use the token mechanism. Just trigger the email with the verification token when the admin creates the user and disable the user registration.
from cakephp-user-tools.
I've merged to master and tagged 1.0.3 Thank you.
from cakephp-user-tools.
Related Issues (20)
- Issues encountered during setup HOT 4
- Validation issue in request_password HOT 1
- Setup Help HOT 5
- when request password: (The email is already in use) HOT 1
- Something wrong in quick start tutorial? HOT 5
- won't update last activity HOT 3
- Does this plugin support multiple user roles? HOT 1
- Register error: Undefined variable: userEntity HOT 7
- Error: Call to a member function user() on boolean HOT 4
- Advice on configuration HOT 2
- Weird redirects HOT 6
- Using controller instead of component HOT 5
- debugKit conflict HOT 4
- how to catch events? HOT 1
- getParam used in UserToolComponent.php HOT 3
- User tools behaviour config email HOT 1
- question about prefix routing HOT 2
- Login not possible after register HOT 1
- Not sending emails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-user-tools.