RdbAdmin Module

UsersEditingTrait

Users editing trait.

Table of Contents

Methods

isEditingHigherRole()  : bool
Check if target user has higher priority role than a user who is editing them.
isMe()  : bool
Check that the specified `$user_id` is me or not.

Methods

isEditingHigherRole()

Check if target user has higher priority role than a user who is editing them.

protected isEditingHigherRole(string|int $user_id) : bool
Parameters
$user_id : string|int

The target user ID.

Return values
bool

Return false if not editing higher priority role, return true if yes.

isMe()

Check that the specified `$user_id` is me or not.

protected isMe(string|int $user_id) : bool
Parameters
$user_id : string|int

User ID to check. Cannot leave blank!

Return values
bool

Return true if it was me, false if not.


        
On this page

Search results