[support] Create User Account In A Blocked State

William Smith william.darren at gmail.com
Sat Nov 21 23:19:01 UTC 2009


Just thinking out loud here, but probably what you could do is do a
hook_form_alter and add a validation handler.  Inside that validation
handler, you could set the $user object to inactive/blocked.

See:
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#validate


On Sat, Nov 21, 2009 at 5:19 PM, chocba <chocba at gmail.com> wrote:

>
> Hi,
> I would like to  perform  a validation on a profile field dispalyed in user
> registration. If this validation fail, I would like to create the user
> account and set his state to blocked. If success, then the user will remain
> as active. Please hlep me how can I achieve this functionality. Right now,
> I'm performing the validation implementing hook_user in profile module. But
> how do I make the user status as blocked instead of active, if the profile
> field validation fails?
> --
> View this message in context:
> http://old.nabble.com/Create-User-Account-In-A-Blocked-State-tp26460928p26460928.html
> Sent from the Drupal - Support mailing list archive at Nabble.com.
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20091121/dca8dc87/attachment.html 


More information about the support mailing list