- let updated_local_user =
- LocalUser::update_password(&mut context.pool(), local_user_id, &password)
- .await
- .with_lemmy_type(LemmyErrorType::CouldntUpdateUser)?;
-
- // Return the jwt if login is allowed
- let site_view = SiteView::read_local(&mut context.pool()).await?;
- let jwt = if site_view.local_site.registration_mode == RegistrationMode::RequireApplication
- && !updated_local_user.accepted_application
- {
- None
- } else {
- Some(
- Claims::jwt(
- updated_local_user.id.0,
- &context.secret().jwt_secret,
- &context.settings().hostname,
- )?
- .into(),
- )
- };
+ LocalUser::update_password(&mut context.pool(), local_user_id, &password)
+ .await
+ .with_lemmy_type(LemmyErrorType::CouldntUpdateUser)?;