PHP Class Frontend\Modules\Profiles\Engine\Authentication

Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method Description
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.

Method Details

cleanupOldSessions() public static method

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

getLoginStatus() public static method

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.
return string One of the FrontendProfilesAuthentication::LOGIN_* constants.

getProfile() public static method

Get a profile object with information about a profile.
public static getProfile ( ) : Profile
return Profile

isLoggedIn() public static method

Check if a profile is logged in.
public static isLoggedIn ( ) : boolean
return boolean

login() public static method

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?
return boolean

logout() public static method

Logout a profile.
public static logout ( )

updatePassword() public static method

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.