[development] aborting user registration and setting an error

Trevor Mckeown tmckeown at gmail.com
Thu Jun 8 16:39:58 UTC 2006


Hi,

I wrote a quick couple of lines of code that inserts a user into two
other databases durning registration.  I accomplished this with
hook_user under the $op value of "insert".

I want to add a check with this module.  The check will search the
other two databases for the email and username and make sure a dup is
not about to be created.  If so I need the user to be redirected back
to the register page and user registration aborted.

The problem is, that I put such a check and redirect in in my
hook_user function, but drupal is still creating the users in it's
database and redirecting the registration page with the error.  I.E
the registration process is not aborted.

Maybe I need to use another $op value besides "insert"?  Maybe a
different hook?  Maybe some function I am not aware of?


Thanks

--Trevor


More information about the development mailing list