Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make sure MySQL is not saying 'this' = 'this ' is true
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and MorrisJobke committed Apr 15, 2020
commit 16e9bf23094a218d01d6b87b22e358473af1e731
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@ public function iLike($x, $y, $type = null) {
$y = $this->helper->quoteColumnName($y);
return $this->expressionBuilder->comparison($x, ' COLLATE ' . $this->charset . '_general_ci LIKE', $y);
}

public function eq($x, $y, $type = null) {
return 'BINARY ' . parent::eq($x, $y, $type);
}

public function neq($x, $y, $type = null) {
return 'BINARY ' . parent::neq($x, $y, $type);
}
}
2 changes: 1 addition & 1 deletion lib/private/User/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected function getUserObject($uid, $backend, $cacheUser = true) {
*/
public function userExists($uid) {
$user = $this->get($uid);
return ($user !== null);
return $user !== null && $user->getUID() === $uid;
}

/**
Expand Down