/**
  * Redirect to OpenID login if they have an OpenID
  *
  * @param Action $action Action being executed
  * @param User   $user   User doing the action
  *
  * @return boolean whether to continue
  */
 function onRedirectToLogin($action, $user)
 {
     if ($this->openidOnly || !empty($user) && User_openid::hasOpenID($user->id)) {
         common_redirect(common_local_url('openidlogin'), 303);
         return false;
     }
     return true;
 }
示例#2
0
 /**
  * Redirect to OpenID login if they have an OpenID
  *
  * @param Action $action Action being executed
  * @param User   $user   User doing the action
  *
  * @return boolean whether to continue
  */
 function onRedirectToLogin($action, $user)
 {
     if (common_config('site', 'openid_only') || !empty($user) && User_openid::hasOpenID($user->id)) {
         common_redirect(common_local_url('openidlogin'), 303);
         return false;
     }
     return true;
 }