Advertisement
Guest User

Untitled

a guest
Jan 27th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function checkLogin($cookie_session_id) {
  2. if(empty($_COOKIE['sessionid']))
  3. }
  4.  
  5. function login($username, $pass)
  6. {
  7. $pass = md5(md5($pass));
  8. $username = $this->db->escape($username);
  9. $this->db->where ("username", $username);
  10. $user = $this->db->getOne ("users");
  11. if(!$user)
  12. {
  13. return false;
  14. }
  15. $db_pass_hash = $user['password_hash'];
  16. if($pass == $db_pass_hash)
  17. {
  18. $_SESSION["login_hash"] = md5($username.$pass);
  19. return true;
  20. }
  21. return false;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement