Skip to Content Skip to Menu

Login as the user you are veiwing button

  • PaceOnline
  • PaceOnline
  • OFFLINE
  • Posts: 104
  • Thanks: 2
  • Karma: 0
2 years 1 week ago #331165 by PaceOnline
Login as the user you are veiwing button was created by PaceOnline
We would like to create a button on a user's profile that can only be seen by moderators when they are viewing a non moderators profile that allows them to login as that user. How can we achieve this using Auto Actions?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 6 days ago #331173 by krileon
Replied by krileon on topic Login as the user you are veiwing button
You'll need to use CB Auto Actions for the login process and the button will need CB Conditional. The below auto action should work.

Global
Triggers: None
Type: Login / Logout
User: Self
Access: All Moderators
Action
Method: User ID
User ID: [get_user]
Force Login: Yes

Now you'd create a Custom HTML field with the HTML to link to the auto actions URL (found under the Global tab of the auto action after saving it) with &user=[user_id] added to the URL. Next add the following condition to the field.

Field: Moderators
User: Viewing User
Operator: Is Moderator

That should do the trick. Note you'll need to update CB Auto Actions as I just now implemented the Force Login parameter to make it easier to switch users during a login action.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum