1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-02 14:17:26 +02:00

Add documentation on how to retrieve status information

This commit is contained in:
Marco
2017-02-26 14:15:26 +01:00
parent 4c084150c4
commit 89a7af17fe

View File

@@ -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`.
#### 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"
```php