Skip to Content Skip to Menu

[SOLVED] Add user to group

  • sirweb
  • sirweb
  • OFFLINE
  • Posts: 226
  • Thanks: 25
  • Karma: 2
6 years 10 months ago - 6 years 10 months ago #300426 by sirweb
[SOLVED] Add user to group was created by sirweb
Working on a set of conditions to add users to Joomla groups.

Trigger: onAfterUserProfileSaved
Conditions: [cb_typ] Less Than 6
[cb_affiliate] Equal To 01
Action Groups = AAA BBB

This works just fine, but we have 46 values in cb_affiliate, which makes a lot of Actions.
Is this an efficient approach, or would you recommend something more efficient?
Does it affect performance on save?
It is not unusual that one CB Moderator updates userprofiles in batches of 100+ users.

Thanks for your input.
Last edit: 6 years 10 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 10 months ago #300435 by krileon
Replied by krileon on topic Add user to group

Is this an efficient approach, or would you recommend something more efficient?

For CB Auto Actions yes it's perfectly efficient. However for your ACL in general having too many usergroups or view access levels isn't really recommended. There's a few things Joomla uses throughout the entire site and one of those is ACL. Usergroups are more than a table assignment since they extend also to permissions. So each permissions page suddenly has 46 more permissions to deal with exponentially (e.g. extension has 10 permissions; that's 460 permissions to save since each usergroup is assigned individually to a permission). You can see how this could become significantly more complicated to manage and for Joomla to parse.

Does it affect performance on save?

No, at least it should not be a noticeable performance impact.


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.
The following user(s) said Thank You: sirweb

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

  • sirweb
  • sirweb
  • OFFLINE
  • Posts: 226
  • Thanks: 25
  • Karma: 2
6 years 10 months ago #300445 by sirweb
Replied by sirweb on topic Add user to group
Thanks! :)
No worries then. Just to roll it out then.
Actually, We haven´t noticed any major performance issues caused by ACL yet.
The site is for a large distributed organisation with many different roles.
We will have to see when we reach the limit.

Thanks.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum