FIX: handle nil user value on password reset
This commit is contained in:
parent
592f8c1637
commit
22a7f1e7f2
|
@ -546,10 +546,10 @@ class UsersController < ApplicationController
|
|||
end
|
||||
else
|
||||
render json: {
|
||||
is_developer: UsernameCheckerService.is_developer?(@user.email),
|
||||
admin: @user.admin?,
|
||||
is_developer: UsernameCheckerService.is_developer?(@user&.email),
|
||||
admin: @user&.admin?,
|
||||
second_factor_required: !valid_second_factor,
|
||||
backup_enabled: @user.backup_codes_enabled?
|
||||
backup_enabled: @user&.backup_codes_enabled?
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue