[SOLVED] Auto action recipe for connecting users ?

11 years 9 months ago #206436 by crony
Ok it works with [gid] but not [gids] so user's that belong to multiple groups are not assigned. (maybe they will be assigned to the first group, but the groupJive groups are not all created.)

Also, I have 250 groupjive's groups to create (there's 250 J! groups...) so it means 250 triggers...
Well, is there a better way ?
Or an automated way to create GJ groups based on J§ groups ?
I guess no... :(

Thanks !

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

11 years 9 months ago #206438 by krileon
Replied by krileon on topic Re: Auto action recipe for connecting users ?

Ok it works with [gid] but not [gids] so user's that belong to multiple groups are not assigned. (maybe they will be assigned to the first group, but the groupJive groups are not all created.)

Ensure you're using the Contains operator as Equal To won't properly match for gids.

Also, I have 250 groupjive's groups to create (there's 250 J! groups...) so it means 250 triggers...
Well, is there a better way ?
Or an automated way to create GJ groups based on J§ groups ?
I guess no...

Your guess is correct. You'd need 250 autos to automate creation and/or joining. I suppose you could create a database query and insert the groups into database using phpmyadmin that pulls information from the usergroup table. Once done run GJ tools so it can run some fixes (creates owners, etc..). That'd definitely speed up the process, but is going to take some good SQL experience. Below is an example of how this'd work.

stackoverflow.com/questions/10007990/mysql-while-loop-select-and-insert


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 to join the conversation.

11 years 9 months ago - 11 years 9 months ago #206445 by crony

What's that for? CB Query Field? If CB Query Field it only shows the result of 1 row. You'd need to set "Output" to "Multiple Rows". As explained above you don't need this for the CB Auto Actions though.


CB Query field, I wanted to use that for GJ, but also needed for some other use...Multiple rows returns nothing ! :(

I've seted up the 3 fields:
[gid]
[gids]
[usertype]
With Does contain, and it's not functionning for multiple groups :(
In fact, I can't add multiple conditions, if I do that, it does not join anything.
I may have only [gid] working, for a user that belongs to one group only.

This is really anoying... :woohoo:

EDIT : silly me ! Seems to work perfectly with "smple" users, it does not work with super users that have multiple groups...
I may see all groups, but I can't be added automaticaly...

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

11 years 9 months ago - 11 years 9 months ago #206452 by krileon
Replied by krileon on topic Re: Auto action recipe for connecting users ?

Multiple rows returns nothing !

You need to configure the row display. Example as follows.
SELECT b.`id` AS 'group_id'
, b.`title` AS 'group_name'
FROM `#__user_usergroup_map` AS a
LEFT JOIN `#__usergroups` AS b
ON b.`id` = a.`group_id`
WHERE a.`user_id` = '[user_id]'
Mode: Internal
Output: Multiple Rows
Row: [column_group_name]

I've no idea why [gids] isn't working. You may want to try the below instead.

[cb:if gids includes "8"]1[/cb:if] Equal To 1

The above trys to check that the user is a Super User (adjust as necessary).


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: crony

Please Log in to join the conversation.

11 years 9 months ago #206458 by crony
Ok for super user thing, I'll test on monday...
It works perfectly for the query !
But how do I separate values with a coma for instance ?
I guess it's with the header and footer field, but I don't get how it works...

Big thanks !

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

11 years 9 months ago - 11 years 9 months ago #206459 by krileon
Replied by krileon on topic Re: Auto action recipe for connecting users ?
Below will give you a comma seperated list.
SELECT GROUP_CONCAT( b.`title` SEPARATOR ', ' )
FROM `#__user_usergroup_map` AS a
LEFT JOIN `#__usergroups` AS b
ON b.`id` = a.`group_id`
WHERE a.`user_id` = '[user_id]'
GROUP BY a.`user_id`
Mode: Internal
Output: Single Row


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.283 seconds

Facebook Twitter LinkedIn