Hello,
can I hide the impersonate button in the settings tab of a user? What hook do I need?
I need to do it in PHP so only specific Users with the hardcoded ID can use that button.
How do I hide the user impersonate button?
Moderators: Developer, Contributor
Re: How do I hide the user impersonate button?
Check out this setting:
/**
* Threshold needed to impersonate a user or NOBODY to disable the feature.
* @global integer $g_impersonate_user_threshold
*/
$g_impersonate_user_threshold = ADMINISTRATOR;
/**
* Threshold needed to impersonate a user or NOBODY to disable the feature.
* @global integer $g_impersonate_user_threshold
*/
$g_impersonate_user_threshold = ADMINISTRATOR;
-
- Posts: 31
- Joined: 18 Jun 2019, 08:35
Re: How do I hide the user impersonate button?
Thank you I solved it like this inside my plugin :
if(auth_get_current_user_id() != 223){
global $g_impersonate_user_threshold;
$g_impersonate_user_threshold = NOBODY;
}