[SOLVED] Auto action recipe for connecting users ?

11 years 9 months ago - 11 years 9 months ago #206369 by crony
Hello,

I would like to know how to achieve an automatic connection for users within the same user group.

I've tried auto action, for connection, but it concerns only people to add with id's.
In fact this would be automaticaly populated each time there's a new user into this group.
I've also seted up a "same group of people" into connection option, but it's completely manual.

Best thing, in fact, should be to have the autojoin groupjive plugin, to automaticaly connect users from a group to his private groupjive group.

I guess I should get the usergroup into CB first, then...
Could you help a bit (or alot...) here ?

Thanks !

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

11 years 9 months ago #206373 by krileon
Replied by krileon on topic Re: Auto action recipe for connecting users ?
Same user group? Do you mean groups from GroupJive? Can you describe in more detail what you're wanting? Do you want to connect the user who is joining a group to the user who created the group?


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 #206376 by crony
Just to let you know, I was trying to find a discussion on the forge( forge.joomlapolis.com/projects/ ) about query field, but it's empty and pointing to the forum. It's a bit disturbing for me, I guess it's better for you to have all on the forum, but my posts are lost :(...


So, I have my groups from Joomla! , then I have also my Groupjive groups.
They have the same names. (but the groupjives groups are not created yet...)

What I need, is to automaticaly have my users from groupA , from joomla, to join a private group, from groupjive, called groupA as well.

So, as far as I get it, it seems I have to create a query field, to get the joomla's group into the profile:
SELECT`usertype`  FROM `#__users` WHERE `uid`=[username];

Then create, an auto action, (or auto from GroupJive ? what's better ? There's also the auto join plugin, I don't get how it works...)

Type: GroupJive 2.x
Trigger: onAfterUserRegistration
User: Automatic
Access: Everybody
Conditional: [cb_usertype] Equal Mygroup
Auto : joingroup
Groups: Mygroup
Situation: moderator

But I don't get the usergroup into the field I've created...

Thanks !

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

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

What I need, is to automaticaly have my users from groupA , from joomla, to join a private group, from groupjive, called groupA as well.

Ah, I see. That's no problem at all. You don't even need the query field either. What you'll need to do is use a condition for the gids field, which contains all their usergroups, but you'll need to use "Contains" operator. Example as follows.

[gids] Does Contain 8

8 being Super Users in the above example. You can find the IDs within Joomla > Users > Groups and it'll be the far right column. The below substitutions are also supported.

[gid]
[gids]
[usertype]

Another one you could do is actually use IF statements. Example as follows.

[cb:if viewaccesslevel includes "1"]1[/cb:if] Equal To 1

The above uses View Access Levels instead of groups, so the above checks if the user is in the Public view access level.

You can use CB Auto Actions or GJ Auto Integration to accomplish this, entirely up to you which you use as they're the same implementation. Your current setup is correct, you just need to adjust the condition to one of the above examples.


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 #206426 by crony
Ok, thanks, need to check your answer better...

I did this for groups :
SELECT `title`
FROM `#__usergroups` AS g, `#__user_usergroup_map` AS m, `#__users` AS u
WHERE m.user_id = u.id
AND m.group_id = g.id
AND `email` = '[email]';

But it returns only one group, and some users belongs to multiple groups...

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

11 years 9 months ago #206429 by krileon
Replied by krileon on topic Re: Auto action recipe for connecting users ?
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.


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.215 seconds

Facebook Twitter LinkedIn