mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 17:24:46 +02:00
Add $session->hasLoginCookie() method
This commit is contained in:
@@ -156,7 +156,7 @@ class PaginatedArray extends WireArray implements WirePaginatable {
|
||||
*
|
||||
* #pw-group-other
|
||||
*
|
||||
* @return int
|
||||
* @return bool
|
||||
* @since 3.0.120
|
||||
*
|
||||
*/
|
||||
|
@@ -235,6 +235,20 @@ class Session extends Wire implements \IteratorAggregate {
|
||||
return !empty($_COOKIE[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is a session login cookie present?
|
||||
*
|
||||
* This only indicates the user was likely logged in at some point, and may not indicate an active login.
|
||||
* This method is more self describing version of `$session->hasCookie(true);`
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.0.175
|
||||
*
|
||||
*/
|
||||
public function hasLoginCookie() {
|
||||
return $this->hasCookie(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the session
|
||||
*
|
||||
|
Reference in New Issue
Block a user