Hi,

I'm trying to set the user's password during account creation, rather than accepting Drupal's randomized starter password. I'm doing this in hook_user / insert, and have tried everything I can think of, to no avail:

  • db_query( "UPDATE users SET pass = MD5('new password') WHERE uid = " . $user->uid );
  • $edit['pass'] = "new password";
  • $user['pass'] = "new password"; $edit['pass'] = NULL;
  • user_save($user, array('pass' => MD5('new password')));

Help!

Thanks,
Jeff Bellsey

Comments

bs’s picture

Hi,
You can use logintoboggan module for this.
http://drupal.org/files/projects/logintoboggan-4.6.0.tar.gz
:)

toma’s picture

Try LoginToboggan

Will do the job for you

http://drupal.org/node/34309

Drupal 4.7 beta 4 demo
http://www.drupaldemo.org