PHP Класс Frontend\Modules\Profiles\Engine\Authentication

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
cleanupOldSessions ( ) Cleanup old session records in the database.
getLoginStatus ( string $email, string $password ) : string Get the login/profile status for the given e-mail and password.
getProfile ( ) : Profile Get a profile object with information about a profile.
isLoggedIn ( ) : boolean Check if a profile is logged in.
login ( integer $profileId, boolean $remember = false ) : boolean Login a profile.
logout ( ) Logout a profile.
updatePassword ( integer $profileId, string $password ) Update profile password and salt.

Описание методов

cleanupOldSessions() публичный статический Метод

Cleanup old session records in the database.
public static cleanupOldSessions ( )

getLoginStatus() публичный статический Метод

Get the login/profile status for the given e-mail and password.
public static getLoginStatus ( string $email, string $password ) : string
$email string Profile email address.
$password string Profile password.
Результат string One of the FrontendProfilesAuthentication::LOGIN_* constants.

getProfile() публичный статический Метод

Get a profile object with information about a profile.
public static getProfile ( ) : Profile
Результат Profile

isLoggedIn() публичный статический Метод

Check if a profile is logged in.
public static isLoggedIn ( ) : boolean
Результат boolean

login() публичный статический Метод

Login a profile.
public static login ( integer $profileId, boolean $remember = false ) : boolean
$profileId integer Login the profile with this id in.
$remember boolean Should we set a cookie for later?
Результат boolean

logout() публичный статический Метод

Logout a profile.
public static logout ( )

updatePassword() публичный статический Метод

Update profile password and salt.
public static updatePassword ( integer $profileId, string $password )
$profileId integer Profile id for which we are changing the password.
$password string New password.