Archived
Send hashed passwords to wp_insert_user to avoid passord change notifications on login
This commit is contained in:
1 parent
786554939c
commit
75dcf88bec
1 file changed
+3
-2
+3
-2
@@ -73,11 +73,12 @@ class GaltinnAuth {
|
||||
}
|
||||
/* Update data */
|
||||
$userdata['ID'] = $existing_user->ID;
|
||||
$userdata['user_pass'] = wp_hash_password($password);
|
||||
|
||||
$updated_user_id = wp_update_user($userdata);
|
||||
$updated_user_id = wp_insert_user($userdata);
|
||||
if (is_wp_error($updated_user_id)) {
|
||||
error_log("[error] " . $updated_user_id->get_error_message() . "(username: $username)");
|
||||
}
|
||||
return get_user_by('id', $updated_user_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user