*/
protected function _setAuth()
{
- if ($GLOBALS['registry']->isAuthenticated(array('app' => $this->_app, 'notransparent' => true))) {
+ global $registry;
+
+ if ($registry->isAuthenticated(array('app' => $this->_app, 'notransparent' => true))) {
return true;
}
/* Destroy any existing session on login and make sure to use a
* new session ID, to avoid session fixation issues. */
- if (!$GLOBALS['registry']->getAuth()) {
- $GLOBALS['registry']->getCleanSession();
+ if (!$registry->getAuth()) {
+ $registry->getCleanSession();
}
$userId = $this->getCredential('userId');
return false;
}
- $GLOBALS['registry']->setAuth($userId, $credentials, array(
+ $registry->setAuth($userId, $credentials, array(
'app' => $this->_app,
'change' => $this->getCredential('change')
));
}
if ($this->hasCapability('authenticatecallback')) {
- $GLOBALS['registry']->callAppMethod($this->_app, $this->_apiMethods['authenticatecallback'], array('noperms' => true));
+ $registry->callAppMethod($this->_app, $this->_apiMethods['authenticatecallback'], array('noperms' => true));
}
return true;