There are two problems you face:
- The user object is
hook_user()not in $user(this is not one of the parameters): it is actually in $account. $user $account hook_user() (. ).
, :
global $user;
$account = user_load(array($user->uid));
, user_save(), , $user hook_user($op = 'load'), : hook_user() , , , , . , $_SESSION.
user113292