Skip to content

Commit 74fb644

Browse files
committed
TD-5388_ add logic for removing the user details from the USER table when a delegate is rejected by the admin, so that one can re register.
1 parent 63521f4 commit 74fb644

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DigitalLearningSolutions.Web/Services/DelegateApprovalsService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void ApproveAllUnapprovedDelegatesForCentre(int centreId)
103103

104104
public void RejectDelegate(int delegateId, int centreId)
105105
{
106-
var delegateEntity = userDataService.GetDelegateById(delegateId);
106+
var delegateEntity = userDataService.GetDelegateById(delegateId);
107107

108108
if (delegateEntity == null || delegateEntity.DelegateAccount.CentreId != centreId)
109109
{
@@ -127,6 +127,7 @@ public void RejectDelegate(int delegateId, int centreId)
127127
else
128128
{
129129
userDataService.RemoveDelegateAccount(delegateId);
130+
userDataService.DeleteUser(delegateEntity.UserAccount.Id);
130131
}
131132

132133
SendRejectionEmail(delegateEntity);

0 commit comments

Comments
 (0)