[wp-hackers] User Roles
peter.westwood at ftwr.co.uk
Mon Mar 19 16:15:54 GMT 2007
On Mon, March 19, 2007 4:01 pm, Andy Staines wrote:
> So - is there an improvement on using wp_get_current_user() ?
>From memory - current_user_can() should provide the functionality you want.
current_user_can() calls has_cap() on the User object which has the
following comment: /has_cap(capability_or_role_name)
Therefore you should be able to do current_user_can("Administrator");
Peter Westwood <peter.westwood at ftwr.co.uk>
More information about the wp-hackers