Skip to content

Commit 0c957df

Browse files
feat(mueller): add has-checkin test
1 parent 5638199 commit 0c957df

File tree

1 file changed

+19
-0
lines changed
  • php-config/Emergence/Mueller/Investigator.config.d

1 file changed

+19
-0
lines changed

php-config/Emergence/Mueller/Investigator.config.d/laddr.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@
5151
},
5252
];
5353

54+
Investigator::$tests['has-checkin'] = [
55+
'points' => 1000,
56+
'function' => function (IUser $User) {
57+
static $checkinMemberIds;
58+
59+
if ($checkinMemberIds === null) {
60+
$checkinMemberIds = array_map(
61+
'intval',
62+
DB::allValues(
63+
'MemberID',
64+
'SELECT DISTINCT MemberID FROM `member_checkins`'
65+
)
66+
);
67+
}
68+
69+
return in_array(strtolower($User->ID), $checkinMemberIds);
70+
},
71+
];
72+
5473
if (SlackAPI::isAvailable()) {
5574
Investigator::$tests['has-slack-account'] = [
5675
'points' => 1000,

0 commit comments

Comments
 (0)