tUser
MMO\oauth\classes · 1 symbol · generated 5 Oct 2026
tUser
tUser.php:17Model for user
- Namespace
MMO\oauth\classes- Uses traits
- tClient
Index
| clientFlags | Client flags | |
| config | ||
| lastPasswordChange | Last date the password was changed. | |
| passhash | Password hash: stored, never exported (an API response, a user embedded in another entity's) | |
| roles | Roles associated with the token. | |
| scopes | ||
| username | ||
| addRole($role) | ||
| allow($uids) | Add scope if it is not already disallowed | |
| applyScopes($scopes, $set) | Apply this scopes onto a list of scopes | |
| blameOwnScope($uid) | ||
| blameScope($uid) | ||
| clearRoles() | ||
| clearScopes() | ||
| disallow($uids) | ||
| getClientFlagsText($separator) | Get the flags as text | |
| getClientRedirectUri() | Returns the registered redirect URI (as a string). | |
| getClientSecret() | ||
| getConfig() | ||
| getLastPasswordChange() | ||
| getOwnScope($uid) | ||
| getOwnScopes() | Return an array of scopes associated with the token. | |
| getRoles() | ||
| getScope($uid) | ||
| getScopes() | Return an array of scopes associated with the token. | |
| getUniqueName() | ||
| getUsername() | ||
| hasClientFlag($flag) | ||
| hasRole($role) | ||
| hasScope($uid) | ||
| isAllowed($uids) | Test if all scopes are allowed | |
| isAnyAllowed($uids) | Test if any scope is allowed Scopes expressed as string can be a list of scope's uid seperated by a space (in this case, all scopes MUST be allowed). | |
| isConfidential() | Returns true if the client is confidential. | |
| markChanged($keys) abstract | Record that properties changed (scopes), so they are saved: aEntity::markChanged | |
| removeRole($role) | ||
| scopesText($separator, $true, $false) | ||
| setLastPasswordChange($datetime) | ||
| setPassword($pwd, $verify) | ||
| setRoles($roles) | ||
| setScope($uid, $value) | Set the scope's value | |
| setScopes($scopes) | ||
| setUsername($value) | The property is declared readonly. | |
| updateClientFlag($flag, $value) | ||
| verifySecret($pwd) |
Properties7
clientFlags
Client flags
- Type
- int
config
- Type
- array
lastPasswordChange
Last date the password was changed.
passhash
Password hash: stored, never exported (an API response, a user embedded in another entity's)
- Type
- string
roles
Roles associated with the token.
- Type
- array
scopes
- Type
- array
username
- Type
- string
Methods37
addRole($role)
tWithRoles.php:24allow($uids)
tWithScopes.php:100Add scope if it is not already disallowed
applyScopes($scopes, $set)
tWithScopes.php:136Apply this scopes onto a list of scopes
| $scopes | array | list of {scope:uid} => {allow:bool} |
| $set = false | bool | mergeScopes |
| returns | void |
blameOwnScope($uid)
tWithScopes.php:52blameScope($uid)
tWithRoles.php:100clearRoles()
tWithRoles.php:57| returns | void |
clearScopes()
tWithScopes.php:91| returns | void |
disallow($uids)
tWithScopes.php:106getClientFlagsText($separator)
tClient.php:64Get the flags as text
getClientRedirectUri()
tUser.php:115Returns the registered redirect URI (as a string).
| returns | string |
getClientSecret()
tUser.php:129getConfig()
tClient.php:71| returns | array |
getLastPasswordChange()
tUser.php:90getOwnScope($uid)
tWithScopes.php:27getOwnScopes()
tWithScopes.php:40Return an array of scopes associated with the token.
| returns | array | bool> |
getRoles()
tWithRoles.php:62| returns | array |
getScope($uid)
tWithRoles.php:87getScopes()
tWithRoles.php:79Return an array of scopes associated with the token.
| returns | array | iScope> |
getUniqueName()
tUser.php:45| returns | string |
getUsername()
tUser.php:41| returns | string |
hasClientFlag($flag)
tClient.php:43hasRole($role)
tWithRoles.php:32hasScope($uid)
tWithScopes.php:31isAllowed($uids)
tWithScopes.php:116Test if all scopes are allowed
isAnyAllowed($uids)
tWithScopes.php:125Test if any scope is allowed Scopes expressed as string can be a list of scope's uid seperated by a space (in this case, all scopes MUST be allowed).
isConfidential()
tUser.php:125Returns true if the client is confidential.
| returns | bool |
markChanged($keys)
abstracttWithScopes.php:25Record that properties changed (scopes), so they are saved: aEntity::markChanged
removeRole($role)
tWithRoles.php:40scopesText($separator, $true, $false)
tWithScopes.php:44setLastPasswordChange($datetime)
tUser.php:94| $datetime = 'now' | DateTimeInterface | string | int | null | |
| returns | bool |
setPassword($pwd, $verify)
tUser.php:68setRoles($roles)
tWithRoles.php:66setScope($uid, $value)
tWithScopes.php:65Set the scope's value
setScopes($scopes)
tWithScopes.php:76setUsername($value)
tUser.php:59The property is declared readonly. $entity['username'] = 'xxx' will not work.