Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Redirect users to homepage when try to visit admin profile

11 years 8 months ago - 11 years 8 months ago #221583 by deltafidesign
Is there a way to redirect users to homepage when click over the profile link of an admin?

I try to explain. I have the CB Activity module setted to show every activity on the site. So also admins actions are stored there. Everyone can click over the admin link to visit his profile. I would redirect users to homepage (or another page) in that case instead of visiting the admin profile.

I've tryed with auto-action but not sure it can works for my needs...

At least, is there a way to hide admins profile? Not only in the Activity module but general, also for direct link?

Thanks
Last edit: 11 years 8 months ago by deltafidesign. Reason: Solved

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221661 by krileon

At least, is there a way to hide admins profile?

Navigate to CB > Plugin Management > CB Activity > Config > General and adjust "Exclude" as needed. Module should respect this configuration same as the other locations.

Not only in the Activity module but general, also for direct link?

Not that I am aware. Suppose you could just use CB Auto Actions to redirect away from your profile. Ensure the Access is set to everyone except your usergroup then check the user id and if it matches yours then redirect.


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.

11 years 8 months ago #221681 by deltafidesign
Ok, I found a solution with Auto Actions. I setted the CMS ACL Access for the action with all groups except for SuperAmins but that doesn't work 'cause The admin has got 2 ACL groups: registered and superadmins so I must set the admin group only to superadmins but in that case the action do not work longer.

So I set the auto-action access to everyone, set back the acl groups for the admin to registered and super users and now who try to visit the admin account is redirected correctly to the homepage (in my case).

But when the admin try to visit his profile he's redirected to homepage too.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221703 by krileon
The "User" parameter is set to automatic by default. This means the access is checking against the access of the profile user. So if you set this to the usergroup of the Super Users then the trigger will only fire on profiles with Super Users usergroup. You then need to add a Conditional to ensure it doesn't affect you such as the below example.

Conditional: [user_id] Not Equal To [cb:userdata field="user_id" user="#me" /]


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.

11 years 8 months ago #221708 by deltafidesign
Thanks. Solved

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

Moderators: beatnantkrileon
Powered by Kunena Forum