XOOPS
2.6.0
|
Public Member Functions | |
__construct () | |
createUserCookie ($userId) | |
forget () | |
invalidateAllForUser ($userId) | |
recall () | |
Protected Member Functions | |
clearUserCookie () | |
clearUserTokens () | |
getNewSeries () | |
getNewToken () | |
getSeriesToken ($series, $token) | |
hasSeries ($series) | |
hasSeriesToken ($series, $token) | |
readUserCookie () | |
readUserTokens ($userId) | |
removeExpiredTokens () | |
setSeriesToken ($series, $token, $values) | |
unsetSeries ($series) | |
unsetSeriesToken ($series, $token) | |
writeUserCookie ($cookieData, $expire=2592000) | |
writeUserTokens ($userId) | |
Protected Attributes | |
$now = 0 | |
$userId = 0 | |
$userTokens = array() | |
$xoops = null | |
Definition at line 56 of file RememberMe.php.
Xoops\Core\Session\RememberMe::__construct | ( | ) |
constructor
Definition at line 82 of file RememberMe.php.
References Xoops\getInstance().
|
protected |
Update cookie status for current session
Definition at line 359 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\writeUserCookie().
Referenced by Xoops\Core\Session\RememberMe\forget(), Xoops\Core\Session\RememberMe\readUserCookie(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
Clear all tokens for this user
Definition at line 310 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\invalidateAllForUser(), Xoops\Core\Session\RememberMe\readUserTokens(), and Xoops\Core\Session\RememberMe\recall().
Xoops\Core\Session\RememberMe::createUserCookie | ( | $userId | ) |
Create a new user cookie, usually in response to login with "remember me" selected
integer | $userId | id of user to be remembered |
Definition at line 342 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\$userId, Xoops\Core\Session\RememberMe\getNewSeries(), Xoops\Core\Session\RememberMe\getNewToken(), Xoops\Core\Session\RememberMe\readUserTokens(), Xoops\Core\Session\RememberMe\setSeriesToken(), Xoops\Core\Session\RememberMe\writeUserCookie(), and Xoops\Core\Session\RememberMe\writeUserTokens().
Xoops\Core\Session\RememberMe::forget | ( | ) |
Forget a "remember me" cookie. This should be invoked if a user explicitly logs out of a session. If a cookie is set for this session, this will clear it and remove the associated series tokens.
Definition at line 143 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\$userId, Xoops\Core\Session\RememberMe\clearUserCookie(), Xoops\Core\Session\RememberMe\readUserCookie(), Xoops\Core\Session\RememberMe\readUserTokens(), Xoops\Core\Session\RememberMe\unsetSeries(), and Xoops\Core\Session\RememberMe\writeUserTokens().
|
protected |
Generate a new series
Definition at line 320 of file RememberMe.php.
References Xoops\Core\Random\generateKey().
Referenced by Xoops\Core\Session\RememberMe\createUserCookie().
|
protected |
Generate a new token
Definition at line 330 of file RememberMe.php.
References Xoops\Core\Random\generateOneTimeToken().
Referenced by Xoops\Core\Session\RememberMe\createUserCookie(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
Get the values associated with a given series and token
string | $series | series identifier |
string | $token | token to check |
Definition at line 217 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\recall().
|
protected |
Check if the given series exists
string | $series | series identifier |
Definition at line 179 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\recall().
|
protected |
Get the values associated with a given series and token
string | $series | series identifier |
string | $token | token to check |
Definition at line 204 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\recall().
Xoops\Core\Session\RememberMe::invalidateAllForUser | ( | $userId | ) |
Invalidate all existing "remember me" cookie by deleting all the series/tokens
This should be called during a password change.
integer | $userId | id of user associated with the sessions/tokens to be invalidated |
Definition at line 165 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\$userId, Xoops\Core\Session\RememberMe\clearUserTokens(), Xoops\Core\Session\RememberMe\readUserTokens(), and Xoops\Core\Session\RememberMe\writeUserTokens().
|
protected |
Read the user cookie
Definition at line 370 of file RememberMe.php.
References $temp, Xoops\Core\Session\RememberMe\clearUserCookie(), and Xoops\Core\Request\getString().
Referenced by Xoops\Core\Session\RememberMe\forget(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
read existing user tokens from persistent storage
integer | $userId | id of user to read tokens for |
Definition at line 259 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\clearUserTokens(), and Xoops\Core\Session\RememberMe\removeExpiredTokens().
Referenced by Xoops\Core\Session\RememberMe\createUserCookie(), Xoops\Core\Session\RememberMe\forget(), Xoops\Core\Session\RememberMe\invalidateAllForUser(), and Xoops\Core\Session\RememberMe\recall().
Xoops\Core\Session\RememberMe::recall | ( | ) |
Recall a user id from the "remember me" cookie.
Definition at line 94 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\$userId, Xoops\Core\Session\RememberMe\clearUserCookie(), Xoops\Core\Session\RememberMe\clearUserTokens(), Xoops\Core\Session\RememberMe\getNewToken(), Xoops\Core\Session\RememberMe\getSeriesToken(), Xoops\Core\Session\RememberMe\hasSeries(), Xoops\Core\Session\RememberMe\hasSeriesToken(), Xoops\Core\Session\RememberMe\readUserCookie(), Xoops\Core\Session\RememberMe\readUserTokens(), Xoops\Core\Session\RememberMe\setSeriesToken(), Xoops\Core\Session\RememberMe\writeUserCookie(), and Xoops\Core\Session\RememberMe\writeUserTokens().
|
protected |
Remove any expired tokens
Definition at line 287 of file RememberMe.php.
References Xoops\Core\Session\RememberMe\$now, Xoops\Core\Session\RememberMe\$userTokens, Xoops\Core\Session\RememberMe\unsetSeries(), and Xoops\Core\Session\RememberMe\unsetSeriesToken().
Referenced by Xoops\Core\Session\RememberMe\readUserTokens().
|
protected |
Get the values associated with a given series and token
string | $series | series identifier |
string | $token | token to check |
array | $values | valuestoken to check |
Definition at line 234 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\createUserCookie(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
Unset an entire series
string | $series | series identifier |
Definition at line 191 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\forget(), and Xoops\Core\Session\RememberMe\removeExpiredTokens().
|
protected |
Get the values associated with a given series and token
string | $series | series identifier |
string | $token | token to check |
Definition at line 247 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\removeExpiredTokens().
|
protected |
Update cookie status for current session
array | string | $cookieData | usercookie value |
integer | $expire | seconds until usercookie expires |
Definition at line 399 of file RememberMe.php.
References $path, XoopsBaseConfig\get(), and Xoops\Core\HttpRequest\getInstance().
Referenced by Xoops\Core\Session\RememberMe\clearUserCookie(), Xoops\Core\Session\RememberMe\createUserCookie(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
write the existing user tokens to persistent storage
integer | $userId | id of user to write tokens for |
Definition at line 276 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\createUserCookie(), Xoops\Core\Session\RememberMe\forget(), Xoops\Core\Session\RememberMe\invalidateAllForUser(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
Definition at line 77 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\removeExpiredTokens().
|
protected |
Definition at line 67 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\createUserCookie(), Xoops\Core\Session\RememberMe\forget(), Xoops\Core\Session\RememberMe\invalidateAllForUser(), and Xoops\Core\Session\RememberMe\recall().
|
protected |
Definition at line 62 of file RememberMe.php.
Referenced by Xoops\Core\Session\RememberMe\removeExpiredTokens().
|
protected |
Definition at line 72 of file RememberMe.php.