Restrict User Access

deprecated.php

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

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 = null ]) : int
Parameters
$user_id : int = null
$level_id : int = null
Tags
deprecated
1.1

use rua_get_user($user_id)->level_memberships()->get($level_id)->get_start()

see
RUA_User_Level_Interface::get_start()
since
0.9

rua_get_user_level_expiry()

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

use rua_get_user($user_id)->level_memberships()->get($level_id)->get_expiry()

see
RUA_User_Level_Interface::get_expiry()
since
0.9

rua_is_user_level_expired()

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

use !rua_get_user($user_id)->level_memberships()->get($level_id)->is_active()

see
RUA_User_Level_Interface::is_active()
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

Search results