[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 402 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BP_User:: (13 methods):
__construct()
BP_User()
_init_caps()
get_role_caps()
add_role()
remove_role()
set_role()
update_user()
add_cap()
remove_cap()
remove_all_caps()
has_cap()
translate_level_to_cap()
__construct( $id, $name = '' ) X-Ref |
PHP4 Constructor - Sets up the object properties. Retrieves the userdata and then assigns all of the data keys to direct properties of the object. Calls {@link BP_User::_init_caps()} after setting up the object's user data properties. param: int|string $id User's ID or username param: int $name Optional. User's username return: BP_User since: 2.0.0 |
BP_User( $id, $name = '' ) X-Ref |
No description |
_init_caps() X-Ref |
Setup capability object properties. Will set the value for the 'cap_key' property to current database table prefix, followed by 'capabilities'. Will then check to see if the property matching the 'cap_key' exists and is an array. If so, it will be used. since: 2.1.0 |
get_role_caps() X-Ref |
Retrieve all of the role capabilities and merge with individual capabilities. All of the capabilities of the roles the user belongs to are merged with the users individual roles. This also means that the user can be denied specific roles that their role might have, but the specific user isn't granted permission to. since: 2.0.0 |
add_role( $role ) X-Ref |
Add role to user. Updates the user's meta data option with capabilities and roles. param: string $role Role name. since: 2.0.0 |
remove_role( $role ) X-Ref |
Remove role from user. param: string $role Role name. since: 2.0.0 |
set_role( $role ) X-Ref |
Set the role of the user. This will remove the previous roles of the user and assign the user the new one. You can set the role to an empty string and it will remove all of the roles from the user. param: string $role Role name. since: 2.0.0 |
update_user() X-Ref |
No description |
add_cap( $cap, $grant = true ) X-Ref |
Add capability and grant or deny access to capability. param: string $cap Capability name. param: bool $grant Whether to grant capability to user. since: 2.0.0 |
remove_cap( $cap ) X-Ref |
Remove capability from user. param: string $cap Capability name. since: 2.0.0 |
remove_all_caps() X-Ref |
Remove all of the capabilities of the user. since: 2.1.0 |
has_cap( $cap ) X-Ref |
Whether user has capability or role name. This is useful for looking up whether the user has a specific role assigned to the user. The second optional parameter can also be used to check for capabilities against a specfic post. param: string|int $cap Capability or role name to search. param: int $post_id Optional. Post ID to check capability against specific post. return: bool True, if user has capability; false, if user does not have capability. since: 2.0.0 |
translate_level_to_cap( $level ) X-Ref |
Convert numeric level to level capability name. Prepends 'level_' to level number. param: int $level Level number, 1 to 10. return: string since: 2.0.0 |
Generated: Wed Oct 16 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |