global $user;
$existingUser = user_load($user->uid);
$existingUser->name = $_REQUEST['user_name'];
$existingUser->mail = $_REQUEST['user_mail'];
$existingUser->init = $_REQUEST['user_mail'];
if(!empty($_REQUEST['user_ pass'])) {
$existingUser->pass = $_REQUEST['user_pass'];
}
user_save((object) array('uid' => $existingUser->uid), (array) $existingUser);
No comments:
Post a Comment