Exemple #1
0
 function edit($id, $data)
 {
     return customer::where($this->primaryKey, $id)->update($data);
 }
Exemple #2
0
 function checkLogin()
 {
     if ($_SERVER['METHOD_REQUEST'] == 'POST') {
         $username = $this->input->post('email');
         $password = $this->input->post('password');
         $customer = new customer();
         $customer->where('username', $username);
         $customer->where('password', md5($password));
         $customer->get();
         if ($customer->exists()) {
             $this->session->set_userdata("userLogin", $customer->username);
             $this->session->set_userdata('userToken', $customer->id);
             $this->session->set_userdata('userLoginFlag', "1");
             redirect(base_url() . $this->lang->lang() . '/payment');
         }
     }
     //$dis['customer'] = $customer;
     $this->column = 2;
     $dis['base_url'] = base_url();
     $dis['view'] = 'front/user/checkLogin';
     $this->viewfront($dis);
 }
 public function sendCustomerPassword()
 {
     $email = Input::get('email');
     $customer = customer::where('customer.email', '=', $email)->first();
     $data = array('name' => $customer->name);
     Mail::send('emails.customer-reset-password', $data, function ($message) use($customer) {
         $message->to($customer->email, $customer->name)->subject('You requested your password');
     });
 }