Skip to Content Skip to Menu

Connections

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
9 years 5 months ago #264840 by mfe13
Connections was created by mfe13
Hi,
I want to create a rule but I do not know if it's possible ...
When a new user registers, I wish he had an automatic connection request with the penultimate user registered on a field in common, for example the same Gender. It would be great to boost the website and connections ! :woohoo:
Is possible ?

Thank you in advance

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
9 years 5 months ago #264863 by krileon
Replied by krileon on topic Connections
You want a user to connect with all other users with the same gender? As long as you don't depend on the connections triggers you could probably just do that using a database query. Example as follows.

Code:
INSERT IGNORE INTO `#__comprofiler_members` ( `referenceid`, `memberid`, `accepted`, `pending`, `membersince` ) SELECT '[user_id]', `id`, 1, 0, NOW() FROM `#__comprofiler` WHERE `cb_gender` = '[cb_gender]'; INSERT IGNORE INTO `#__comprofiler_members` ( `referenceid`, `memberid`, `accepted`, `pending`, `membersince` ) SELECT `id`, '[user_id]', 1, 0, NOW() FROM `#__comprofiler` WHERE `cb_gender` = '[cb_gender]';

Believe that should establish a connection both ways between the user registering and other users with same gender. I didn't test it so be sure to test carefully and adjust as needed.


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.

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
9 years 5 months ago #264881 by mfe13
Replied by mfe13 on topic Connections
Thank you, I'm not clear ...
I want the latest registred connects with only 1 user of the same gender, who has registered just before him on the site.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
9 years 5 months ago #264893 by krileon
Replied by krileon on topic Connections
Then you'll need to modify the select query for that. It'll need to join the _users table, order by the registration date, and have a limit of 1 added to it.


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.

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
9 years 5 months ago #264908 by mfe13
Replied by mfe13 on topic Connections
I'll try, thank you.

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

Moderators: beatnantkrileon
Powered by Kunena Forum