Facebook
From Sweltering Sloth, 9 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 520
  1.        function remaindPassword()
  2.         {
  3.                         $new_pass='now'.rand(11,2339);
  4.                         $this->contents->table = 'customers';
  5.                         $this->contents->cond = "email='".mysql_real_escape_string($_POST['email'])."'";
  6.                         $this->contents->order = false;
  7.                        
  8.                         $this->contents->data=array('tmppass'=>$new_pass);
  9.                         $this->contents->update();
  10.                        
  11.                         $user = $this->contents->getContent();
  12.                        
  13.                          
  14.                        
  15.                         $this->contents->assign('hash',sha1($user['email']));
  16.                         $this->contents->assign('new_pass',$new_pass);
  17.                         $msg = mysql_escape_string($this->contents->fetch('system/remain_password_email.html'));
  18.                        
  19.                         $this->contents->display('system/remain_password.html');
  20.                        
  21.                         $this->sendEmailMsg($this->config['remain_password_msg_from'],$this->config['remain_password_msg_email'],$_POST['email'], $this->config['remain_password_msg_title'], $msg);
  22.                        
  23.                         exit;
  24.                 }