RegistrationApplication::find_by_local_user_id(conn, local_user_id)
})
.await??;
- if registration.deny_reason.is_some() {
- return Err(LemmyError::from_message("registration_denied"));
+ if let Some(deny_reason) = registration.deny_reason {
+ let lang = get_user_lang(local_user_view);
+ let registration_denied_message = format!("{}: {}", lang.registration_denied(), &deny_reason);
+ return Err(LemmyError::from_message(®istration_denied_message));
} else {
return Err(LemmyError::from_message("registration_application_pending"));
}