Always trim the username before saving changes in the database
Fixes #4742
This commit is contained in:
committed by
Frédéric Guillot
parent
5f3225bddc
commit
bd8bcfbc37
@@ -261,6 +261,10 @@ class UserModel extends Base
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($values['username'])) {
|
||||
$values['username'] = trim($values['username']);
|
||||
}
|
||||
|
||||
$this->helper->model->removeFields($values, array('confirmation', 'current_password'));
|
||||
$this->helper->model->resetFields($values, array('is_ldap_user', 'disable_login_form'));
|
||||
$this->helper->model->convertNullFields($values, array('gitlab_id'));
|
||||
|
||||
Reference in New Issue
Block a user