mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Aggiornamento della documentazione integrata
Miglioramento della documentazione integrata delle classi principali.
This commit is contained in:
@ -293,31 +293,6 @@ class Auth extends \Util\Singleton
|
||||
return password_hash($password, self::$passwordOptions['algorithm'], self::$passwordOptions['options']);
|
||||
}
|
||||
|
||||
public static function check()
|
||||
{
|
||||
return self::getInstance()->isAuthenticated();
|
||||
}
|
||||
|
||||
public static function admin()
|
||||
{
|
||||
return self::getInstance()->isAdmin();
|
||||
}
|
||||
|
||||
public static function user()
|
||||
{
|
||||
return self::getInstance()->getUser();
|
||||
}
|
||||
|
||||
public static function logout()
|
||||
{
|
||||
return self::getInstance()->destory();
|
||||
}
|
||||
|
||||
public static function firstModule()
|
||||
{
|
||||
return self::getInstance()->getFirstModule();
|
||||
}
|
||||
|
||||
/**
|
||||
* Restituisce l'elenco degli stati del sistema di autenticazione.
|
||||
*
|
||||
@ -327,4 +302,52 @@ class Auth extends \Util\Singleton
|
||||
{
|
||||
return self::$status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Controlla se l'utente è autenticato.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function check()
|
||||
{
|
||||
return self::getInstance()->isAuthenticated();
|
||||
}
|
||||
|
||||
/**
|
||||
* Controlla se l'utente appartiene al gruppo degli Amministratori.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function admin()
|
||||
{
|
||||
return self::getInstance()->isAdmin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Restituisce le informazioni riguardanti l'utente autenticato.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function user()
|
||||
{
|
||||
return self::getInstance()->getUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Distrugge le informazioni riguardanti l'utente autenticato, forzando il logout.
|
||||
*/
|
||||
public static function logout()
|
||||
{
|
||||
return self::getInstance()->destory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Restituisce il nome del primo modulo navigabile dall'utente autenticato.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function firstModule()
|
||||
{
|
||||
return self::getInstance()->getFirstModule();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user