Hello,

I'm looking to send a Privatemsg welcome message to a new user via Action of Rules Module on the Event: "User Account has been created". However, my guess is that as the new user account is set to 'non-authenticated' role via LoginToboggan until they are validated and account is set to authenticated role, the execution of the Rule fails and says:
"Message not sent, reported error: Disallowed to send message because all recipients are blocked"

Also, there is currently an Event called "User account details have been updated" but it does not seem to be executed when the validation occurs and User's "non-authenticated" role is removed. Is this as per design or should this be registered in the system as an event?

Solution: Is it possible to have an Event in Rules that says "User Account has been validated"?
Also, there may be other benefits from having rules integration that I cannot think of at the moment.

LoginToboggan Settings
Set password: YES
Non-authenticated role: non-authenticated
Immediate login: YES

Comments

hunmonk’s picture

Status: Active » Closed (works as designed)

i'm not really interested in direct Rules integration -- whenever possible i try to avoid module-specific dependency code, and instead opt for exposing data in drupal core's common APIs.

you can look for the object property $account->logintoboggan_email_validated = TRUE in the the $account object during the 'update' op of hook_user() to determine if the account has just been validated by LT.

robby.smith’s picture

Status: Closed (works as designed) » Active

Hello hunmonk,

Would you or someone in the community be able to help create this one event to be used with the Rules module (instructions of the code to be put into a custom module?) I believe the community will benefit greatly from this. The event 'User has been validated' would be very powerful in allowing admin to set Rules Actions such as Send a Message to the user informing him of the features available to him/her and other Actions when the user is validated.

Thank you!

hunmonk’s picture

Status: Active » Closed (works as designed)

i really don't know anything about the rules module, and don't have an interest in this feature. comment #1 contains all that a drupal coder would need from the LT side to build the rule.

IMO this request is beyond the scope of this issue queue. i suggest you look to the drupal.org forums for some help, or consider hiring a developer to code this if you're unable.

robby.smith’s picture

Thank you for the quick reply. I will try the drupal.org forums for support.
Regards

Ela’s picture

Did you figure this out?
You can also configure your custom message to be sent to users on user settings page : admin/user/settings
That's what I did to make it work for me.

robby.smith’s picture

I have not been able to figure this out =(
In my case I want to send a different configurable message depending on role so I'm really wanting to get this to work.

Can anyone in the community help?

robby.smith’s picture

Status: Closed (works as designed) » Active

Sorry to reopen this but I have not yet been able to get this to work and hoping that someone close to LoginToboggan can assist.

When the temporary role "non-authenticated" (in my case) is removed with validation, the Rules event "User account details have been updated" is not being triggered. I assumed the event will be triggered as a role is being removed from the user. Is this not the case?

Which Rules event would be able to pick up this change in user's role?
I am trying to trigger an action to show a configurable message as well as send a privatemsg to the user.
The actions are all available but the problem I am having is to pick up the event of validation.

Please assist. Thank you!

hunmonk’s picture

Status: Active » Fixed

this section of code is called any time LT processes a login. it should give you the flag you're looking to leverage:

  // Allow other modules to react to email validation by invoking the user update hook.
  // This should only be triggered if LT's custom validation is active.
  if (!variable_get('user_email_verification', TRUE)) {
    $edit = array();
    $account->logintoboggan_email_validated = TRUE;
    user_module_invoke('update', $edit, $account);
  }

robby.smith’s picture

Status: Fixed » Active

Hi hunmonk,

Thanks for all your help so far and sorry for having so many questions.
The Rules event "User details have been updated" is suppose to trigger when the account details of a user has been updated.
But for some reason it doesn't in the case of LoginToboggan. Does LoginToboggan do it differently like before the user is logged in so that the changes are not registered and picked up by the Rules module?

LoginToboggan is the only module so far I've worked with that is having trouble with Rules module.
I would really appreciate any further guidance in allowing a Rules event to be triggered. Then the community can really benefit from the information by allow endless actions from the event.

Thank you very much!

hunmonk’s picture

Status: Active » Fixed

look at the code i posted above. it's a standard invocation of the user update hook. rules should support that.

robby.smith’s picture

I have opened #733624: Event "User details have been updated" not triggered for LoginToboggan validation (user account role update) in Rules issue queue as the code above that is called any time LT processes a login is not being registered by the Rules module. Thanks again

Bilmar’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

muba’s picture

Hai.,

I'm Developing a web applications in drupal. and its my first time to have a drupal. i need to know how to use the login to boggan. then i alredy have this module and i configured with roles in /admin/user/logintoboggan and i also create different roles like own clients, prospective clients. but when i give in logintoboggan page redirected path with node/15. after at all i login into another role as a own clients. it wont redirect to that node/15 pages.

Anyone have known the answer., pls let me know.

Advance in Thanks.

with regards,

H.AL-MUBARAK

rupalee’s picture

Assigned: Unassigned » rupalee
chinita7’s picture

I tried module #12 to redirect users after account creation to nod/add page but it doesn't work for me.

1sp’s picture

@chino7 this logintoboggan rules module works on the event of account validation

chinita7’s picture

@528491 Thank you for your quick reply.
account validation means the moment the user account is being saved?
Sorry for my newbie question anyway.