1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-03 22:57:27 +02:00

Implement method 'getRememberDirectiveSelector' in class 'Auth'

This commit is contained in:
Marco
2018-03-24 23:02:01 +01:00
parent 62f4b39dcf
commit 29afbdfc93

View File

@@ -1777,4 +1777,20 @@ final class Auth extends UserManager {
);
}
/**
* Returns the selector of a potential locally existing remember directive
*
* @return string|null
*/
private function getRememberDirectiveSelector() {
if (isset($_COOKIE[$this->rememberCookieName])) {
$selectorAndToken = \explode(self::COOKIE_CONTENT_SEPARATOR, $_COOKIE[$this->rememberCookieName], 2);
return $selectorAndToken[0];
}
else {
return null;
}
}
}