mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-04 07:07:25 +02:00
Add documentation on how to retrieve status information
This commit is contained in:
28
README.md
28
README.md
@@ -323,6 +323,34 @@ Remember that usernames are optional and there is only a username if you supplie
|
|||||||
|
|
||||||
If the user is not currently signed in, this returns `null`.
|
If the user is not currently signed in, this returns `null`.
|
||||||
|
|
||||||
|
#### Status information
|
||||||
|
|
||||||
|
```php
|
||||||
|
if ($auth->isNormal()) {
|
||||||
|
// user is in default state
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($auth->isArchived()) {
|
||||||
|
// user has been archived
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($auth->isBanned()) {
|
||||||
|
// user has been banned
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($auth->isLocked()) {
|
||||||
|
// user has been locked
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($auth->isPendingReview()) {
|
||||||
|
// user is pending review
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($auth->isSuspended()) {
|
||||||
|
// user has been suspended
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### Checking whether the user was "remembered"
|
#### Checking whether the user was "remembered"
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
Reference in New Issue
Block a user