Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkLogin($cookie_session_id) {
- if(empty($_COOKIE['sessionid']))
- }
- function login($username, $pass)
- {
- $pass = md5(md5($pass));
- $username = $this->db->escape($username);
- $this->db->where ("username", $username);
- $user = $this->db->getOne ("users");
- if(!$user)
- {
- return false;
- }
- $db_pass_hash = $user['password_hash'];
- if($pass == $db_pass_hash)
- {
- $_SESSION["login_hash"] = md5($username.$pass);
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement