Example #1
0
 public function handleProviderCallback()
 {
     $char = Socialize::with('eveonline')->user();
     try {
         $user = User::where('char_id', $char->id)->firstOrFail();
     } catch (ModelNotFoundException $e) {
         $user = User::createAndFill(['char_id' => $char->id, 'char_name' => $char->name, 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]);
     }
     Auth::login($user, true);
     return redirect('home');
 }
Example #2
0
 /**
  * @return array
  */
 public function listUnregistered()
 {
     $users = User::where('slack_id', null)->get();
     return $users;
 }
Example #3
0
 /**
  * @param string $email
  *
  * @return User
  */
 public static function findByEmail($email)
 {
     return User::where('email', $email)->firstOrFail();
 }