Skip to Content Skip to Menu

CB AutoAction - UserList

  • webmonkey
  • webmonkey
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
6 years 11 months ago #299438 by webmonkey
CB AutoAction - UserList was created by webmonkey
Hi,
I need to do the following:

I have two group: Teachers - Students

I've create a Searchable UserList available only for Student that are looking for a teacher.

I want that every time a Student perform a teacher's search, CB Auto Action send an email to the first teacher of the resulting list and write the query the student has performed in a field named cb_search_1

Is this possible? If yes in which way? which trigger and which type and which variable

Thanks
N.

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 #299551 by krileon
Replied by krileon on topic CB AutoAction - UserList
It's doable, but seams like you'd just be spamming your teachers with emails. Why is this necessary exactly? There's a send email form the student can use to email the teachers when needed without forcing a notification like this. You maybe able to do this using the below.

Global
Triggers: onBeforeDisplayUsersList
Type: Email
User: User
Access: Everybody
Conditions
1: [var7] Is Not Empty
Action
To: [var2_0_email]

Note I have not tested the above. This is just an example put together based off the triggers variables, which are as follows.

Code:
$_PLUGINS->trigger( 'onBeforeDisplayUsersList', array( &$row, &$users, &$columns, &$fields, &$input, $row->listid, &$search, &$Itemid, 1 ) )


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.

  • webmonkey
  • webmonkey
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
6 years 10 months ago #300262 by webmonkey
Replied by webmonkey on topic CB AutoAction - UserList
Thanks very much,
and if I would like to send the same email to ALL the teachers in the search result?

thanks
N.

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 #300285 by krileon
Replied by krileon on topic CB AutoAction - UserList

and if I would like to send the same email to ALL the teachers in the search result?

You'll need to ensure CB Auto Actions is up to date then utilize the new looping functionality for user objects. Example as follows.


Global
Triggers: onBeforeDisplayUsersList
Type: Email
User: Manually
User Variable: Variable 2
Access: Everybody
Conditions
1: [var7] Is Not Empty
Action
To:
Code:
[email]

This again is extremely spammy. I strongly recommend you do not do this. You will likely be black listed by multiple major email providers unless this is all to internal email addresses.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum