kohana-auth

Kohana 3 auth module, getting users with 'staff' or 'manager' role

▼魔方 西西 提交于 2019-12-22 06:37:06
问题 I'm learning the framework, and now building an application using it. I need to get all users that have 'user' or 'staff' role, but I couldn't find about it on the documentation. Help anyone? (I think it's more an ORM problem the the auth module) 回答1: I didn't find an easy way to do this using the ORM, but I have a workaround. This is my code for anyone who might encounter the same problem with me. // One for each role $staffs = ORM::factory('role', array('name' => 'staff'))->users->find_all(

Kohana 3 Auth in IE

↘锁芯ラ 提交于 2019-12-13 08:45:18
问题 I'm finding I can't log in to my Kohana site through IE. (just IE, works fine everywhere else) It's validating, so much as, it knows if you get your username and password wrong, but its not creating the session. I've added to: application/config/session.php <?php return array( 'cookie' => array( 'name' => 'session_cookie', 'encrypted' => TRUE, 'lifetime' => 43200, ), 'native' => array( 'name' => 'session_native', 'encrypted' => TRUE, 'lifetime' => 43200, ), 'database' => array( 'name' =>

how to extend kohana user auth module

谁都会走 提交于 2019-12-08 04:36:09
问题 So i'm using kohana user module, and i would like to extend my register page, now it adds username, email, and password but i would like to add some extra fields, and i just can't find where can i do it. I found function action_register which leads to Auth::instance()->register($_POST, true); so i found this function register($fields) which leads to $user = ORM::factory('user'); and $user->create_user($fields, array() so i'm stuck somewhere here, i'm not even sure if i'm going the right path.

how to extend kohana user auth module

一个人想着一个人 提交于 2019-12-06 14:58:23
So i'm using kohana user module, and i would like to extend my register page, now it adds username, email, and password but i would like to add some extra fields, and i just can't find where can i do it. I found function action_register which leads to Auth::instance()->register($_POST, true); so i found this function register($fields) which leads to $user = ORM::factory('user'); and $user->create_user($fields, array() so i'm stuck somewhere here, i'm not even sure if i'm going the right path... Just create user.php file under application/classes/model folder and put this inside: <?php defined(