Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user = ORM::factory('user');
- $user->username = 'yoda';
- $user->email = 'aeon.yoda@gmail.com';
- $user->password = '12345';
- $user->save();
- $user->add('roles', ORM::factory('role', 1));
- $user->save();
- $status = Auth::instance()->login('yoda', '12345');
- if ($status)
- {
- echo 'true';
- }
- else
- {
- echo 'false';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement