The function returns a boolean value (true or false) indicating whether the permission ID exists in the permissions table of the database.
Example
permissionIdExists(2)
Further Documentation:
This is generally an internal UserSpice function and is not usually used by developers.
$permissionId = 123;
if (function_exists('permissionIdExists') && permissionIdExists($permissionId)) {
echo "Permission ID $permissionId exists.";
} else {
echo "Permission ID $permissionId does not exist.";
}
In the example above, the function_exists check is performed to ensure that the permissionIdExists function is defined. Then, the permissionIdExists function is called with the $permissionId variable as the argument. Based on the return value, it prints a corresponding message indicating whether the permission ID exists or not.