Skip to content

Instantly share code, notes, and snippets.

@adelarcubs
Created December 12, 2017 13:53
Show Gist options
  • Save adelarcubs/9aea47d2cc2e97387f0cfa8d54b8ab8f to your computer and use it in GitHub Desktop.
Save adelarcubs/9aea47d2cc2e97387f0cfa8d54b8ab8f to your computer and use it in GitHub Desktop.
<?php
$userEmail = 'test@test.com';
$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