Comments on: Setting up and using the Auth module in Kohana 3.1 http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/ Just another WordPress weblog Tue, 22 Jul 2014 10:00:12 +0000 hourly 1 https://wordpress.org/?v=4.7.9 By: Eduardo http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-28553 Sun, 17 Feb 2013 17:47:53 +0000 http://pogopixels.com/blog/?p=124#comment-28553 Just a note that costed me some time to find.
It’s necessary to create a model to the user, when creating it it’s necessary to extend Model_Auth_User. I was extending ORM and it broke when I was saving the role.
Hope it helps somebody =D

]]>
By: Laurent http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-11916 Sun, 15 May 2011 02:02:44 +0000 http://pogopixels.com/blog/?p=124#comment-11916 Thanks Niski, I mentioned it in the post.

]]>
By: niski http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-11915 Sat, 14 May 2011 21:16:36 +0000 http://pogopixels.com/blog/?p=124#comment-11915 Oh, good to know…

BTW, that’s the code which needs to be put just after first
$client->save();

$role = ORM::factory(‘role’,’1′);
$client->add(‘roles’,$role);
$client->save();

]]>
By: Laurent http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-11914 Sat, 14 May 2011 14:56:35 +0000 http://pogopixels.com/blog/?p=124#comment-11914 Unfortunately, I don’t know as I ended up developing my own Auth class. Kohana Auth’s module does too many magic things behind the scene and it’s difficult to guess how they expect us to work with it. It also unnecessarily force us to follow certain conventions (like the names of roles, the fact that a user cannot login with his email, it has to be his username, etc.). All this should be customizable, like in the Zend Framework, to be really useful.

It took me a day to understand the module and work around its limitations and just a an hour or so to develop mine. It’s not as complete but it does the job and at least I know how it works.

]]>
By: niski http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-11906 Fri, 13 May 2011 22:31:35 +0000 http://pogopixels.com/blog/?p=124#comment-11906 And what about assigning roles to user?

In http://kohanaframework.org/3.1/guide/api/Auth_ORM#_login it looks like the user needs to be put into roles_users with id of login role…

Without that set I wasn’t able to log in. I’ve inserted the row manually in database, is there any solution using kohana objects?

]]>
By: MBa http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-11743 Wed, 20 Apr 2011 15:09:07 +0000 http://pogopixels.com/blog/?p=124#comment-11743 Thanks a lot.

]]>
By: Bernardo http://pogopixels.com/blog/setting-up-and-using-the-auth-module-in-kohana-31/comment-page-1/#comment-11661 Sat, 16 Apr 2011 23:29:09 +0000 http://pogopixels.com/blog/?p=124#comment-11661 I spent many hours trying to make the system login KO3.1 work until you get into your post.
I tried to access it before the google search for it seems that was outside of HR.

Wonderful contribution.

]]>