Example #1
0
 /**
  * Updates a customer.
  *
  * @param Model_Customer $customer The customer to update.
  * @param array          $data     The data to use to update the customer.
  *
  * @return Model_Customer
  */
 public static function update(Model_Customer $customer, array $data = array())
 {
     $customer->populate($data);
     try {
         $customer->save();
     } catch (FuelException $e) {
         Log::error($e);
         return false;
     }
     Service_Event::trigger('customer.update', $customer->seller, $customer->to_array());
     return $customer;
 }