* Finish task#44804
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->user->username;?></th>
|
||||
<td class='required'><?php echo html::input('username', $user->username, "class='form-control' placeholder='{$lang->gitlab->user->username}'");?></td>
|
||||
<td><?php echo html::input('username', $user->username, "readonly class='form-control' placeholder='{$lang->gitlab->user->username}'");?></td>
|
||||
<td class="tips-git"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name='external' id="external" value='1' <?php if($user->external) echo 'checked';?> /><label for="external" class="no-margin"><?php echo $lang->gitlab->user->externalTip; ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->user->bind;?></th>
|
||||
|
||||
Reference in New Issue
Block a user