123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- return array(
-
- 'username' => 'email',
-
- 'user' => function($id)
- {
- if ( ! is_null($id) and filter_var($id, FILTER_VALIDATE_INT) !== false)
- {
- return User::find($id);
- }
- },
-
- 'attempt' => function($username, $password, $config)
- {
- if ( ! is_null($user = User::where($config['username'], '=', $username)->first()))
- {
- if (Hasher::check($password, $user->password)) return $user;
- }
- },
-
- 'logout' => function($user) {}
- );
|