diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-20 11:21:14 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-20 11:21:14 -0400 |
commit | 8079b5af64fbebd14a3a0e470bc48bcb4a9bade3 (patch) | |
tree | 74da6e544529a4d74b5fdbf3ab854e43809eeb10 /app/Model/User.php | |
parent | d019eb4d2f193c7daea8ae0b098a0eb25084a975 (diff) |
Fix Mysql error about gitlab_id when creating remote user
Diffstat (limited to 'app/Model/User.php')
-rw-r--r-- | app/Model/User.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Model/User.php b/app/Model/User.php index 8a7eff4a..5792a549 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -91,7 +91,7 @@ class User extends Base ->table(User::TABLE) ->eq('id', $user_id) ->eq('is_admin', 1) - ->count() === 1; + ->exists(); } /** @@ -251,7 +251,7 @@ class User extends Base $result = array(); foreach ($users as $user) { - $result[$user['id']] = $user['name'] ?: $user['username']; + $result[$user['id']] = $this->getFullname($user); } asort($result); @@ -278,7 +278,9 @@ class User extends Base } $this->removeFields($values, array('confirmation', 'current_password')); - $this->resetFields($values, array('is_admin', 'is_ldap_user', 'is_project_admin')); + $this->resetFields($values, array('is_admin', 'is_ldap_user', 'is_project_admin', 'disable_login_form')); + $this->removeEmptyFields($values, array('gitlab_id')); + $this->convertIntegerFields($values, array('gitlab_id')); } /** |