Skip to content

fix unreliable test function #488

@simonLeary42

Description

@simonLeary42

// 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtesting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions