Created
December 12, 2017 13:53
-
-
Save adelarcubs/9aea47d2cc2e97387f0cfa8d54b8ab8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$userEmail = '[email protected]'; | |
$userPassword = '123456'; | |
// Using Doctrine for example | |
$user = $repository->findByEmail($userEmail); | |
if(!$user) { | |
// User not found | |
// LOGIN ERROR | |
} | |
if(md5($userPassword) == $user->getPassword()) { | |
// DO LOGIN | |
} | |
// LOGIN ERROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment