Fixed bug where renaming of user to current name failed
This commit is contained in:
parent
08289e6745
commit
d2e4082dbc
1 changed files with 2 additions and 1 deletions
|
@ -287,7 +287,8 @@ class Users
|
|||
$query = $this->db->prepare('SELECT id FROM users WHERE name=:name AND backend=\'native\'');
|
||||
$query->bindValue(':name', $name);
|
||||
$query->execute();
|
||||
if ($query->fetch() !== false) {
|
||||
$record = $query->fetch();
|
||||
if ($record !== false && intval($record['id']) !== $userId) {
|
||||
throw new \Exceptions\AlreadyExistentException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue