@@ -564,7 +564,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
var isDoctorHaveAccount = await _userRoleRepository.AnyAsync(t => t.DoctorId == doctorId);
|
||||
var isDoctorHaveAccount = await _userRoleRepository.AnyAsync(t => t.DoctorId == doctorId || t.IdentityUser.EMail == doctor.EMail);
|
||||
|
||||
|
||||
if (!isDoctorHaveAccount)
|
||||
@@ -601,7 +601,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
else
|
||||
{
|
||||
sysUserInfo = (await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.DoctorId == doctorId)).Include(t => t.UserRoleList).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
sysUserInfo = (await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.DoctorId == doctorId || t.IdentityUser.EMail == doctor.EMail)).Include(t => t.UserRoleList).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user