-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
account-portal/test/functional/PiRemoveUserTest.php
Lines 24 to 35 in 66d27b3
| // the ordering of the uids in getGroupMemberUIDs is different each time | |
| // use a linear search to find a user who is not the PI | |
| $memberToDelete = null; | |
| foreach ($memberUIDs as $uid) { | |
| if ($uid != $piUid) { | |
| $memberToDelete = new UnityUser($uid, $LDAP, $SQL, $MAILER, $WEBHOOK); | |
| if ($memberToDelete->hasRequestedAccountDeletion()) { | |
| continue; | |
| } | |
| break; | |
| } | |
| } |
there is no check that memberToDelete is not null, and it also may accidentally still use a user who requested account deletion.