09-04-2016, 02:13 PM
The current definition of is somewhat special-purpose and (perhaps) obsolete.
I am suggesting a new function called which is a little more general-purpose and will change the definition of to simply call with the appropriate parameter.
I will confess I am happy with the stability of (I have tested it) whereas I don't use at all and so I haven't tested whether my change is backward compatible. [honesty strikes] OK, I haven't tested my definition of at all - I just typed it into the pastebin. Phew, conscience relieved. :-)
http://pastebin.com/cexD5maq
This provides a more generic way to check if a user (either the current user or someone else) has a given permission/group.
Code:
checkPermissions()
I am suggesting a new function called
Code:
hasPermission()
Code:
checkPermissions()
Code:
hasPermission()
I will confess I am happy with the stability of
Code:
hasPermission()
Code:
checkPermissions()
Code:
checkPermission()
http://pastebin.com/cexD5maq
This provides a more generic way to check if a user (either the current user or someone else) has a given permission/group.