Beispiel #1
0
 /**
  * когда обнаружили, что изменились внешние данные пользователя
  *
  * @param string $phone    новый телефон
  * @param string $password новый пароль
  *
  * @return Customer
  */
 public function updateCustomerByExternal($phone, $password)
 {
     Reporter::customerUpdateExternalStart($this->customer->id, $phone, $password);
     $this->customer->phone = $this->phone($phone);
     $this->customer->save();
     $this->customer->credential->agbis_password = $password;
     $this->customer->credential->password = $this->hash($password);
     $this->customer->credential->save();
     Reporter::customerUpdateExternalEnd($this->customer->id);
     return $this;
 }