I've written a plugin for 3.0 that allows you to set up users pretty easy 
and quick for your application. The plugin was written in a way so that it 
allows you to configure virtually everything. If there is something missing 
from being configurable please let me know.

https://github.com/burzum/cakephp-user-tools

The plugin is still considered as *alpha* version and tagged as 
1.0.0-alpha. So issues might be still there and API changes are expected. 
However, in my local testing it worked fine an there are some unit tests 
present.

Just attach the UserTool component 
<https://github.com/burzum/cakephp-user-tools/blob/develop/src/Controller/Component/UserToolComponent.php>
 
to your users controller and you can directly register and login, just go 
to /<controller>/register and  /<controller>/login. Password reset is 
available under  /<controller>/request_password. Check the documentation 
<https://github.com/burzum/cakephp-user-tools/blob/develop/docs/Home.md> 
for more details. The component is by default configured to map some 
actions to the component but you can disable the mapping of actions and 
implement your own login() method for example and still call 
$this->UserTool->login() within that method.

The User behavior 
<https://github.com/burzum/cakephp-user-tools/blob/develop/src/Model/Behavior/UserBehavior.php>
 
is the very likely the more interesting part as it implements all the 
logic. Check it's default settings, there are plenty of configuration 
options you can change. Just make sure that your DB table matches what the 
plugin expects *or* configure the fieldmap of the behavior to reflect your 
tables fields. If you don't have an users table yet, the plugin comes with 
a DB migration for the official CakePHP 3.0 migrations plugin.

I don't have an active 3.0 project yet to work on and use this plugin. So 
I'm looking for any suggestions you have to improve the plugin. *Any 
feedback is welcome and appreciated!*

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to