Restrict User Access

Documentation

Packages

Default
RestrictUserAccess

Interfaces, Classes and Traits

RUA_Level_Interface
RUA_User_Interface
RUA_User_Level_Interface
RUA_Collection

Table of Contents

rua_get_user_roles()  : array<string|int, mixed>
rua_get_user_levels()  : array<string|int, mixed>
rua_get_user_level_start()  : int
rua_get_user_level_expiry()  : int
rua_is_user_level_expired()  : bool
rua_has_user_level()  : bool
rua_add_user_level()  : int|bool
rua_remove_user_level()  : bool
rua_get_user()  : RUA_User_Interface
rua_get_level()  : RUA_Level_Interface
rua_get_user_level()  : RUA_User_Level_Interface
rua_get_level_by_name()  : WP_Post|bool
rua_get_level_caps()  : array<string|int, mixed>

Functions

rua_get_user_roles()

rua_get_user_roles(int $user_id) : array<string|int, mixed>
Parameters
$user_id : int
Tags
deprecated
0.17

use get_userdata($user_id)->roles

since
0.9

rua_get_user_levels()

rua_get_user_levels([int $user_id = null ][, bool $hierarchical = true ][, bool $synced_roles = true ][, bool $include_expired = false ]) : array<string|int, mixed>
Parameters
$user_id : int = null
$hierarchical : bool = true
$synced_roles : bool = true
$include_expired : bool = false
Tags
deprecated
1.1

use rua_get_user($user_id)->get_level_ids()

see
RUA_User_Interface::get_level_ids()
since
0.9

rua_get_user_level_start()

rua_get_user_level_start([int $user_id = null ], int $level_id) : int
Parameters
$user_id : int = null
$level_id : int
Tags
deprecated
1.1

use rua_get_user($user_id)->get_level_start($level_id)

see
RUA_User_Interface::get_level_start()
since
0.9

rua_get_user_level_expiry()

rua_get_user_level_expiry([int $user_id = null ], int $level_id) : int
Parameters
$user_id : int = null
$level_id : int
Tags
deprecated
1.1

use rua_get_user($user_id)->get_level_expiry($level_id)

see
RUA_User_Interface::get_level_expiry()
since
0.9

rua_is_user_level_expired()

rua_is_user_level_expired([int $user_id = null ], int $level_id) : bool
Parameters
$user_id : int = null
$level_id : int
Tags
deprecated
1.1

use rua_get_user($user_id)->is_level_expired($level_id)

see
RUA_User_Interface::is_level_expired()
since
0.9

rua_has_user_level()

rua_has_user_level(int $user_id, int $level_id) : bool
Parameters
$user_id : int
$level_id : int
Tags
deprecated
1.1

use rua_get_user($user_id)->has_level($level_id)

see
RUA_User_Interface::has_level()
since
0.9

rua_add_user_level()

rua_add_user_level(int $user_id, int $level_id) : int|bool
Parameters
$user_id : int
$level_id : int
Tags
deprecated
1.1

use rua_get_user($user_id)->add_level($level_id)

see
RUA_User_Interface::add_level()
since
0.10

rua_remove_user_level()

rua_remove_user_level(int $user_id, int $level_id) : bool
Parameters
$user_id : int
$level_id : int
Tags
deprecated
1.1

use rua_get_user($user_id)->remove_level($level_id)

see
RUA_User_Interface::remove_level()
since
0.10

rua_get_user()

rua_get_user([WP_User|int|null $user = null ]) : RUA_User_Interface
Parameters
$user : WP_User|int|null = null

null or omit for current user

Tags
since
1.1

rua_get_level_by_name()

rua_get_level_by_name(string $name) : WP_Post|bool
Parameters
$name : string
Tags
since
0.9

rua_get_level_caps()

rua_get_level_caps(int $level_id[, bool $hierarchical = false ]) : array<string|int, mixed>
Parameters
$level_id : int
$hierarchical : bool = false
Tags
since
0.13

Search results