1
0
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:
Marco
2017-10-18 23:03:41 +02:00
parent 4a66965994
commit 36880b87c9

View File

@@ -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()
);
}
}