array best(
string
$perm, [int
$user = false], [bool
$zero = true]
)
|
|
Returns the best perms a user has for something...
Parameters:
|
string |
$perm: |
the permission to be worked out |
|
int |
$user: |
the user to have permissions checked. if left blank, currently logged in user used. |
|
bool |
$zero: |
if true, zero is best |
API Tags:
| Return: | best permissions |
| Access: | public |
Information Tags:
bool has(
string
$perm, [int
$user = false]
)
|
|
Finds out if a user has permission to do something...
Parameters:
|
string |
$perm: |
the permission to be worked out |
|
int |
$user: |
the user to have permissions checked. If left blank, currently logged in user used. |
API Tags:
| Return: | true if user has perm, otherwise false |
| Access: | public |
Information Tags:
array sort(
string
$permArray
)
|
|
Attempts to sort out the weird permissions array.
Parameters:
|
string |
$permArray: |
the permission array to be sorted |
API Tags:
| Return: | sorted permissions |
| Access: | public |
Information Tags:
| Author: | Pita <peter@randomnity.com> |
| Author: | Matthias Reuter |
| Since: | 2.0 |
| Sample: | $ipbwi->permissions->sort(array('show' => '*','read' => '*','start' => '*','reply' => '*','upload' => '*','download' => '*'));
|