diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 867d1a0bf5..019eacf01d 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -2064,6 +2064,7 @@ class gitlabModel extends model $user = fixer::input('post')->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->account)) dao::$errors['account'][] = $this->lang->gitlab->user->bind . $this->lang->gitlab->user->emptyError; 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; @@ -2114,9 +2115,15 @@ class gitlabModel extends model */ public function editUser($gitlabID) { - $user = fixer::input('post')->remove('username')->removeIF(!$this->post->password, 'password,password_repeat')->remove('avatar')->get(); + $user = fixer::input('post') + ->setDefault('can_create_group', 0) + ->setDefault('external', 0) + ->remove('username,avatar') + ->removeIF(!$this->post->password, 'password,password_repeat') + ->get(); if(!empty($_FILES['avatar'])) $user->avatar = curl_file_create($_FILES['avatar']['tmp_name'], $_FILES['avatar']['type'], $_FILES['avatar']['name']); + if(empty($user->account)) dao::$errors['account'][] = $this->lang->gitlab->user->bind . $this->lang->gitlab->user->emptyError; if(empty($user->name)) dao::$errors['name'][] = $this->lang->gitlab->user->name . $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; diff --git a/module/gitlab/view/createuser.html.php b/module/gitlab/view/createuser.html.php index 4e897a7c68..5b0219ed80 100644 --- a/module/gitlab/view/createuser.html.php +++ b/module/gitlab/view/createuser.html.php @@ -19,6 +19,10 @@
+ + + + @@ -43,7 +47,7 @@ - + @@ -61,11 +65,7 @@
- - - - - + @@ -79,26 +79,6 @@ - - - - - - - - - - - - - - - - - - - -
gitlab->user->bind;?>
gitlab->user->name;?> gitlab->user->name}'");?>gitlab->user->passwordRepeat}'");?>
gitlab->user->bind;?>
gitlab->user->skype;?>gitlab->user->skype}'");?>
gitlab->user->linkedin;?>gitlab->user->linkedin}'");?>
gitlab->user->twitter;?>gitlab->user->twitter}'");?>
gitlab->user->websiteUrl;?>gitlab->user->websiteUrl}'");?>
gitlab->user->note;?>gitlab->user->note}'");?>
diff --git a/module/gitlab/view/edituser.html.php b/module/gitlab/view/edituser.html.php index 128025b3b5..105585c933 100644 --- a/module/gitlab/view/edituser.html.php +++ b/module/gitlab/view/edituser.html.php @@ -20,6 +20,10 @@ id);?> + + + + @@ -44,7 +48,7 @@ - + @@ -64,10 +68,6 @@ - - - - @@ -80,26 +80,6 @@ - - - - - - - - - - - - - - - - - - - -
gitlab->user->bind;?>
gitlab->user->name;?> name, "class='form-control' placeholder='{$lang->gitlab->user->name}'");?>gitlab->user->passwordRepeat}'");?>
gitlab->user->bind;?>
gitlab->user->avatar;?>
gitlab->user->skype;?>skype, "class='form-control' placeholder='{$lang->gitlab->user->skype}'");?>
gitlab->user->linkedin;?>linkedin, "class='form-control' placeholder='{$lang->gitlab->user->linkedin}'");?>
gitlab->user->twitter;?>twitter, "class='form-control' placeholder='{$lang->gitlab->user->twitter}'");?>
gitlab->user->websiteUrl;?>website_url, "class='form-control' placeholder='{$lang->gitlab->user->websiteUrl}'");?>
gitlab->user->note;?>note, "rows='10' class='form-control' placeholder='{$lang->gitlab->user->note}'");?>