Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $account = user_load(array('uid' => $userdata['uid']));
- $password = user_password();
- $username = $userdata['username'];
- $updates = array(
- 'pass' => $password,
- 'roles' => array(
- <rid> => '<role title>';
- ),
- );
- user_save($account, $updates);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement