public static function AuthorizedUserToResetThePassword($params) { $model = ApiParams::checkRequiredParams($params, ApiParams::$REQUIRED_RESTORE_PASSWORD_PARAMS); if ($model->errors) { return $model; } else { $new_model = RecipientMobileLogin::getUserByDeviceID($params[ApiParams::DEVICE_ID]); if (!$new_model) { $model->addError(RecipientMobileLogin::DEVICE_ID, $error = self::DEVICE_ID_ERROR_MESSAGE); return $model; } else { $model = self::checkloginParams($new_model, $params, true); } return $model; } }