Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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
Add Comment
Please, Sign In to add comment