/** * Gets the server object. Only one instance will be created for * each page request. * * @return bdApi_OAuth2 */ public function getServer() { if (self::$_serverInstance === false) { self::$_serverInstance = new bdApi_OAuth2($this); } return self::$_serverInstance; }
public function getUserDetails($nameOrEmail) { $user = $this->_model->getUserModel()->getUserByNameOrEmail($nameOrEmail); if (empty($user)) { // user not found return false; } return array('user_id' => $user['user_id'], 'scope' => bdApi_Template_Helper_Core::getInstance()->scopeJoin($this->_model->getSystemSupportedScopes())); }