forked from github/plane
fix: user login after account deactivation (#3073)
This commit is contained in:
parent
1d3745157d
commit
de24b02a0a
@ -343,13 +343,6 @@ class MagicSignInEndpoint(BaseAPIView):
|
|||||||
|
|
||||||
if str(token) == str(user_token):
|
if str(token) == str(user_token):
|
||||||
user = User.objects.get(email=email)
|
user = User.objects.get(email=email)
|
||||||
if not user.is_active:
|
|
||||||
return Response(
|
|
||||||
{
|
|
||||||
"error": "Your account has been deactivated. Please contact your site administrator."
|
|
||||||
},
|
|
||||||
status=status.HTTP_403_FORBIDDEN,
|
|
||||||
)
|
|
||||||
# Send event
|
# Send event
|
||||||
auth_events.delay(
|
auth_events.delay(
|
||||||
user=user.id,
|
user=user.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user