Function allowedTo
Check the user's permissions. checks whether the user is allowed to do permission. (ie. post_new.) If boards is specified, checks those boards instead of the current one. If any is true, will return true if the user has the permission on any of the specified boards Always returns true if the user is an administrator.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Security.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Security.php
string|array |
$permission |
A single permission to check or an array of permissions to check |
integer|array |
$boards = null |
The ID of a board or an array of board IDs if we want to check board-level permissions |
boolean |
$any = false |
Whether to check for permission on at least one board instead of all boards |
boolean
|
Whether the user has the specified permission |