diff --git a/user_personal.php b/user_personal.php index ac01d9df..20a677f3 100644 --- a/user_personal.php +++ b/user_personal.php @@ -129,7 +129,7 @@ case 'save': } } - if(!array_key_exists('username', $u) || $u['username'] == '') { + if(!$fields['username'] || !array_key_exists('username', $u) || $u['username'] == '') { $u['username'] = $u['email']; }