Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function login($u,$p){
- // sql injection safe guard
- $u = str_replace('\\"','"',$u);
- $u = str_replace('\\\\','\\',$u);
- $p = str_replace('\\"','"',$p);
- $p = str_replace('\\\\','\\',$p);
- //$this->DB()->debug=true;
- $this->Load("username='".$u."' and password='".md5($p)."'");
- if(!empty($this->username)){
- $_SESSION['user'] = array(
- "iduser"=>$this->iduser,
- "username"=>$this->username,
- "role"=>$this->role
- );
- return true;
- }else{
- $this->error = $this->language['errors']['Login_Failure'];
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement