Пример #1
0
 public function executeChangePassword()
 {
     $sms = new AB_SMS();
     $old_password = $this->getParameter('old_password');
     $new_password = $this->getParameter('new_password');
     $result = $sms->changePassword($new_password, $old_password);
     if ($result === false) {
         wp_send_json_error(array('message' => current($sms->getErrors())));
     } else {
         wp_send_json_success();
     }
 }