예제 #1
0
 /**
  * Populates openid accounts array when needed
  */
 protected function _populateOpenIDAccounts()
 {
     if ($this->_openid_accounts === null) {
         framework\Logging::log('Populating openid accounts');
         $this->_openid_accounts = tables\OpenIdAccounts::getTable()->getIdentitiesForUserID($this->getID());
         framework\Logging::log('...done (Populating user clients)');
     }
 }
예제 #2
0
 public function runRemoveOpenIDIdentity(framework\Request $request)
 {
     $identity = tables\OpenIdAccounts::getTable()->getIdentityFromID($request['openid']);
     if ($identity && $this->getUser()->hasOpenIDIdentity($identity)) {
         tables\OpenIdAccounts::getTable()->doDeleteById($request['openid']);
         return $this->renderJSON(array('message' => $this->getI18n()->__('The OpenID identity has been removed from this user account')));
     }
     $this->getResponse()->setHttpStatus(400);
     return $this->renderJSON(array('error' => $this->getI18n()->__('Could not remove this OpenID account')));
 }