Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail

Package s2Member\User_Access

s2member\includes\classes\user-access.inc.php at line #28

Class c_ws_plugin__s2member_user_access

c_ws_plugin__s2member_user_access

public class c_ws_plugin__s2member_user_access

User access routines.

Since:

3.5


( 5 Methods )
Method Summary
public static array

user_access_ccaps(obj $user)

Determines Custom Capabilities of a User/Member.

public static str

user_access_label(obj $user)

Determines Access Label for a User/Member.

public static int

user_access_level(obj $user)

Determines Access Level of a User/Member.

public static str

user_access_role(obj $user)

Determines the Access Role of a User/Member.

public static int

user_access_role_to_level(str $role)

Determines Access Level of a specific Role.

( 5 Methods )
Method Detail

s2member\includes\classes\user-access.inc.php at line #67

user_access_ccaps()

public static array user_access_ccaps(obj $user)

Determines Custom Capabilities of a User/Member.

If $user is NOT passed in, check the current User/Member. If $user IS passed in, this function will check a specific $user. Returns an array of Custom Capabilities.

Since:

3.5

Parameters:

obj $user - Optional. A WP_User object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.

Returns:

array - Array of Custom Capabilities, or an empty array if they have no Custom Capabilities, or if $user does not exist, or if no User is currently logged-in.

[ back to top ]

s2member\includes\classes\user-access.inc.php at line #158

user_access_label()

public static str user_access_label(obj $user)

Determines Access Label for a User/Member.

If $user is NOT passed in, check the current User/Member. If $user IS passed in, this function will check a specific $user.

Since:

3.5

Parameters:

obj $user - Optional. A WP_User object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.

Returns:

str - Access Level Label, empty string if $user does not exist, or if no User is currently logged-in.

[ back to top ]

s2member\includes\classes\user-access.inc.php at line #98

user_access_level()

public static int user_access_level(obj $user)

Determines Access Level of a User/Member.

If $user is NOT passed in, check the current User/Member. If $user IS passed in, this function will check a specific $user. Returns -1 thru number of configured Levels, according to the Access Level#.

Since:

3.5

Parameters:

obj $user - Optional. A WP_User object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.

Returns:

int - Access Level#, -1 if $user does not exist, or if no User is currently logged-in.

[ back to top ]

s2member\includes\classes\user-access.inc.php at line #44

user_access_role()

public static str user_access_role(obj $user)

Determines the Access Role of a User/Member.

If $user is NOT passed in, check the current User/Member. If $user IS passed in, this function will check a specific $user. Returns their Role ID/Name value.

Since:

3.5

Parameters:

obj $user - Optional. A WP_User object. Defaults to the current User. In order to check the current User, you must call this function with no arguments/parameters.

Returns:

str - Role ID/Name, or an empty string if they have no Role, or if $user does not exist, or if no User is currently logged-in.

[ back to top ]

s2member\includes\classes\user-access.inc.php at line #124

user_access_role_to_level()

public static int user_access_role_to_level(str $role)

Determines Access Level of a specific Role.

Since:

3.5

Parameters:

str $role - A WordPress® Role ID/Name.

Returns:

int - Access Level#, -1 if $role is empty.

[ back to top ]

Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail