mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-04 07:07:25 +02:00
Implement method 'createRememberCookieName' in class 'Auth'
This commit is contained in:
13
src/Auth.php
13
src/Auth.php
@@ -1803,4 +1803,17 @@ final class Auth extends UserManager {
|
||||
return $descriptor . '_' . $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a unique cookie name for the 'remember me' feature
|
||||
*
|
||||
* @param string|null $sessionName (optional) the session name that the output should be based on
|
||||
* @return string
|
||||
*/
|
||||
public static function createRememberCookieName($sessionName = null) {
|
||||
return self::createCookieName(
|
||||
'remember',
|
||||
($sessionName !== null) ? $sessionName : \session_name()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user