Activate user account after public form saved

Events happening in the community are now at Drupal community events on www.drupal.org.
avpavlov's picture

Hi!

I have following problem

  • database contains a lot of not activated accounts
  • to activate account user has to fill public form with 2 fields
    • email
    • some unique identifier which is known to user
  • application finds user account by email, verifies unique identifier and sends activation email

Question is can Rules execute arbitrary PHP code to find user account (or even there is easier way?)

Please note, self-registration is not applicable in my case, as user list must be maintained outside Drupal application.

Best regards, Alexander Pavlov

Comments

Found answer in FAQ - feel

avpavlov's picture

Found answer in FAQ - feel myself stupid :(

But now there is other question - is there Rules action to activate some user account? I see only "block user account"

Where in the FAQ?

itangalo's picture

-1-
I was curious about the solution you found. Would you like to post a link?

-2-
It's really weird that the "unblock" function isn't an action available to Rules. It's probably because the function is called user_user_operations_unblock and not something ending with _action, but I can't see why it's named like this.
Anyway: you can call the function from Views Bulk Operations, and I guess that VBO is a pretty convenient way of listing all users matching the entered e-mail address and the unique code.
Then execute the VBO programatically when the activation form is submitted.

Good luck!
//Johan Falk, Sweden

I was curious about the

avpavlov's picture

I was curious about the solution you found. Would you like to post a link?

it is in "Rules" group Faq :)

http://groups.drupal.org/rules/faq#php-action

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: