1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?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)
- {
- $user = User::where($config['username'], '=', $username)->first();
- if ( ! is_null($user) and Hash::check($password, $user->password))
- {
- return $user;
- }
- },
-
- 'logout' => function($user) {}
- );
|