Skip to content
Snippets Groups Projects
Commit 5b45c4af authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #146313 by walkah: _user_edit_validate assumes arg(1) == 'register'...

- Patch #146313 by walkah: _user_edit_validate assumes arg(1) == 'register' when being called for the user_register form
parent 3cafffe6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1509,7 +1509,7 @@ function user_edit_form($uid, $edit, $register = FALSE) {
function _user_edit_validate($uid, &$edit) {
$user = user_load(array('uid' => $uid));
// Validate the username:
if (user_access('change own username') || user_access('administer users') || arg(1) == 'register') {
if (user_access('change own username') || user_access('administer users') || !$user->uid) {
if ($error = user_validate_name($edit['name'])) {
form_set_error('name', $error);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment