Merge branch 'master' into 'dev_production'
Master
See merge request !27
Showing
| ... | @@ -65,17 +65,24 @@ class Api_model extends CI_Model { | ... | @@ -65,17 +65,24 @@ class Api_model extends CI_Model { |
| $data['phone'] = '966'.$data['phone']; | $data['phone'] = '966'.$data['phone']; | ||
| } | } | ||
| $customer_data = array( | $customer_data = array('customer_id'=>$id,'phone'=>$data['phone'], | ||
| 'customer_id'=>$id, | 'email'=>$data['email_id'],'name'=>$data['name']); | ||
| 'phone'=>$data['phone'], | |||
| 'email'=>$data['email_id'], | |||
| 'name'=>$data['name'] | |||
| ); | |||
| $this->db->insert('customer', $customer_data); | $this->db->insert('customer', $customer_data); | ||
| $subject = "New account created successfully"; | $subject = "New account created successfully"; | ||
| $email_id = $data['email_id']; | $email_id = $data['email_id']; | ||
| $message = "Hi,\n\r Welcome to TimeOut.\r\n Please use username: ".$email_id." and Password: ".$temp_password." for access your account"; | |||
| $template = getNotifTemplate(); | |||
| $message .= "<html> | |||
| <body> | |||
| Hi,\n\r Welcome to TimeOut. \r\n Please use username: | |||
| ".$email_id." and Password: ".$temp_password." | |||
| for access your account <br> | |||
| ".$template['registration_mail']." | |||
| </body> | |||
| </html>"; | |||
| $this->send_mail($subject,$email_id,$message); | $this->send_mail($subject,$email_id,$message); | ||
| $this->db->select('customer.name,customer.dob,customer.phone,customer.email,customer.profile_image AS image,customer.gender,users.id AS userId, customer.city,customer.dob'); | $this->db->select('customer.name,customer.dob,customer.phone,customer.email,customer.profile_image AS image,customer.gender,users.id AS userId, customer.city,customer.dob'); | ||
| $this->db->where('users.id',$id); | $this->db->where('users.id',$id); | ||
| ... | @@ -117,7 +124,8 @@ class Api_model extends CI_Model { | ... | @@ -117,7 +124,8 @@ class Api_model extends CI_Model { |
| $ci->email->cc('[email protected]'); | $ci->email->cc('[email protected]'); | ||
| $ci->email->subject($subject); | $ci->email->subject($subject); | ||
| $ci->email->message($message); | $ci->email->message($message); | ||
| if($attach!=null) { | $ci->email->set_mailtype('html'); | ||
| if($attach != null) { | |||
| $ci->email->attach($attach); | $ci->email->attach($attach); | ||
| } | } | ||
| return $ci->email->send(); | return $ci->email->send(); | ||
| ... | @@ -130,10 +138,17 @@ class Api_model extends CI_Model { | ... | @@ -130,10 +138,17 @@ class Api_model extends CI_Model { |
| $unique_id = uniqid().time(); | $unique_id = uniqid().time(); | ||
| $this->db->where('email',$data['email_id'])->update('customer',array('reset_key'=>$unique_id)); | $this->db->where('email',$data['email_id'])->update('customer',array('reset_key'=>$unique_id)); | ||
| $subject = "TimeOut: Forgot Password"; | $subject = "TimeOut: Forgot Password"; | ||
| // $baseUrl = "http://localhost:4200/"; | $url = 'https://projects.nuvento.com/forgot/?reset_key='.$unique_id; | ||
| $baseUrl = "https://projects.nuvento.com/"; | |||
| $url = $baseUrl.'forgot/?reset_key='.$unique_id; | $template = getNotifTemplate(); | ||
| $message = "Please use mentioned link for reset your password: ".$url; | $message = "<html> | ||
| <body> | |||
| <p>Please use mentioned link for reset your password: ".$url."</p> | |||
| <br> | |||
| ".$template['forgot_mail']." | |||
| </body> | |||
| </html>"; | |||
| $email = $data['email_id']; | $email = $data['email_id']; | ||
| $result = $this->send_mail($subject,$email,$message); | $result = $this->send_mail($subject,$email,$message); | ||
| if($result){ | if($result){ | ||
| ... | ... |
Please
register
or
sign in
to comment