mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-23 13:22:08 +08:00
Email confirmation fail on multiple confirmation attempts (#8656)
If an user already confirmed his email address and tries to confirm it again it should fail.
This commit is contained in:
committed by
GitHub
parent
7ac17272d2
commit
d5acf2dc41
@@ -120,7 +120,11 @@ namespace Orchard.Users.Services {
|
|||||||
var user = _membershipService.GetUser(username);
|
var user = _membershipService.GetUser(username);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
if (user.As<UserPart>().EmailStatus == UserStatus.Approved) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
user.As<UserPart>().EmailStatus = UserStatus.Approved;
|
user.As<UserPart>().EmailStatus = UserStatus.Approved;
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
@@ -195,4 +199,4 @@ namespace Orchard.Users.Services {
|
|||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user