Skip to content
Open
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
3 changes: 3 additions & 0 deletions app/Services/WikiUserEmailChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ private function emailExists(PDO $pdo, string $dbName, string $table, string $em
$stmt = $pdo->prepare("
SELECT 1
FROM {$dbName}.{$table}

-- converting from tinyblob data type, see https://github.com/wbstack/api/blob/main/database/mw/new/mw1.43-wbs2.sql#L1006
WHERE LOWER(CONVERT(user_email USING utf8mb4)) = LOWER(:email)

LIMIT 1
");

Expand Down
1 change: 1 addition & 0 deletions tests/Commands/User/CheckUserEmailExistTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

class CheckUserEmailExistTest extends TestCase {
protected function tearDown(): void {
// delete all users
User::query()->delete();
}

Expand Down
Loading