XenConcept
Well-known member
Hello,
I have an idea. Can change the order of recovery of an integer permission.
For reasons X we need to be able to recover a permission in descending order.
Example :
For a member it is allowed to create a conversation with 20 messages But for premium it is allowed with 10 messages.
That's the code I'm using :
thank you for your understanding
I have an idea. Can change the order of recovery of an integer permission.
For reasons X we need to be able to recover a permission in descending order.
Example :
For a member it is allowed to create a conversation with 20 messages But for premium it is allowed with 10 messages.
That's the code I'm using :
PHP:
public function pickPermissionIntegerPriorityValue(array $values, $permissionType)
{
$highest = 0;
foreach ($values AS $value)
{
if ($value == -1)
{
return -1;
}
else if ($value > 0)
{
$highest = $value;
}
}
return $highest;
}
thank you for your understanding
Last edited:
Upvote
1