Horde_Registry::getAuthCredential PHP Method

getAuthCredential() public method

Returns the requested credential for the currently logged in user, if present.
public getAuthCredential ( string $credential = null, string $app = null ) : mixed
$credential string The credential to retrieve.
$app string The app to query. Defaults to Horde.
return mixed The requested credential, all credentials if $credential is null, or false if no user is logged in.
    public function getAuthCredential($credential = null, $app = null)
    {
        if (!$this->getAuth()) {
            return false;
        }
        $credentials = $this->_getAuthCredentials($app);
        return is_null($credential) ? $credentials : (is_array($credentials) && isset($credentials[$credential]) ? $credentials[$credential] : false);
    }