How To Login As Any User Via ClipBucket Plugin

41 views October 18, 2016 Saqib Razzaq 0

For Admins, ClipBucket offers an additional feature which is called “Login as user” where you can login as just about any user on website. It allows you to go down to user level and see exactly what they see and possibly improve things. It will help you import your design patterns, speeds up debugging and is generally fun to see your user’s activities

Here is how you can login as a user via ClipBucket plugin.

First thing that you need to do is get userid of user that you wish to login as. Once you have the userid, it is a simple matter of calling a function.


global $userquery;
$userid = 'user_id_here';
$login = $userquery->login_as_user($userid);
if ($login) {
redirect_to(BASEURL);
}

And Voilla! You are now logged in as that user.

Was this helpful?