Example #1
0
 public function post_renew()
 {
     if (User::renew()) {
         return $this->get_logout();
     }
     return view('account.renew');
 }
Example #2
0
 /**
  * Forces user authentication without ANY checks. Use with caution. 
  * Primarily it's used by the internal methods.
  *
  * @param User object to be authenticated
  * @return User object
  */
 static function forceAuth($new_user)
 {
     $new_user->setLastLogin(time());
     $new_user->save();
     Session::getInstance()->setUserId($new_user->getId());
     Session::getInstance()->save();
     User::renew();
     return $new_user;
 }