Skip to content

Commit

Permalink
fix: a user email validation error when only changing the case of som…
Browse files Browse the repository at this point in the history
…e caracters. Make a comparison with lowercase converted strings.
  • Loading branch information
JoelAlphonso committed Dec 3, 2019
1 parent 4b94348 commit b512a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Charcoal/User/AbstractUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ protected function validateLoginUnique()

$originalUser = $factory->create($objType)->load($this->getAuthId());

if ($originalUser->getAuthIdentifier() !== $userLogin) {
if (mb_strtolower($originalUser->getAuthIdentifier()) !== mb_strtolower($userLogin)) {
$existingUser = $factory->create($objType)->loadFrom($userKey, $userLogin);
/** Check for existing user with given email. */
if (!empty($existingUser->getAuthId())) {
Expand Down

0 comments on commit b512a0e

Please sign in to comment.