* Finish task#44804

This commit is contained in:
zenggang
2021-11-25 03:31:08 +00:00
parent 4b7d519ac5
commit e0cf5d56f4
2 changed files with 3 additions and 4 deletions

View File

@@ -2107,11 +2107,10 @@ class gitlabModel extends model
*/
public function editUser($gitlabID)
{
$user = fixer::input('post')->removeIF(!$this->post->password, 'password,password_repeat')->remove('avatar')->get();
$user = fixer::input('post')->remove('username')->removeIF(!$this->post->password, 'password,password_repeat')->remove('avatar')->get();
if(!empty($_FILES['avatar'])) $user->avatar = curl_file_create($_FILES['avatar']['tmp_name'], $_FILES['avatar']['type'], $_FILES['avatar']['name']);
if(empty($user->name)) dao::$errors['name'][] = $this->lang->gitlab->user->name . $this->lang->gitlab->user->emptyError;
if(empty($user->username)) dao::$errors['username'][] = $this->lang->gitlab->user->username . $this->lang->gitlab->user->emptyError;
if(empty($user->email)) dao::$errors['email'][] = $this->lang->gitlab->user->email . $this->lang->gitlab->user->emptyError;
if(dao::isError()) return false;
if(!empty($user->password) and $user->password != $user->password_repeat)