Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function logIn($username, $password)
- {
- //$password = password_hash($password, PASSWORD_DEFAULT);
- $uid = $this->findUser($username);
- if ($uid >= 0) {
- $user = $this->fetchUser($uid);
- if (($user) and (password_verify($password, $user['password']))) {
- $_SESSION['uid'] = $uid;
- $_SESSION['user'] = $user;
- return true;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement