Method |
Description |
|
deleteCookie ( string $user_id = null ) |
Deletes the cookie
It's necessary to split deleteCookie() and logout() as cookies are deleted without logging out too!
Sets the remember-me-cookie to ten years ago (3600sec * 24 hours * 365 days * 10). |
|
incrementFailedLoginCounterOfUser ( $user_name ) |
Increments the failed-login counter of a user |
|
isUserLoggedIn ( ) : boolean |
Returns the current state of the user's login |
|
login ( $user_name, $user_password, $set_remember_me_cookie = null ) : boolean |
Login process (for DEFAULT user accounts). |
|
loginWithCookie ( $cookie ) : boolean |
performs the login via cookie (for DEFAULT user account, FACEBOOK-accounts are handled differently)
TODO add throttling here ? |
|
logout ( ) |
Log out process: delete cookie, delete session |
|
resetFailedLoginCounterOfUser ( $user_name ) |
Resets the failed-login counter of a user back to 0 |
|
saveTimestampOfLoginOfUser ( $user_name ) |
Write timestamp of this login into database (we only write a "real" login via login form into the database,
not the session-login on every page request |
|
setRememberMeInDatabaseAndCookie ( $user_id ) |
Write remember-me token into database and into cookie
Maybe splitting this into database and cookie part ? |
|
setSuccessfulLoginIntoSession ( $user_id, $user_name, $user_email, $user_account_type ) |
The real login process: The user's data is written into the session. |
|