-
Notifications
You must be signed in to change notification settings - Fork 6
/
report_no_login.php
39 lines (27 loc) · 1.06 KB
/
report_no_login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
include_once("includes/inc.global.php");
include("classes/class.table.php");
$p->site_section = ADMINISTRATION;
$p->page_title = "Members Who Have Never Logged In";
$cUser->MustBeLevel(1);
$output = "";
$table = new cTable;
$table->AddSimpleHeader(array("Member", "Join Date", "Phone Number(s)", "Email(s)"));
// $table->SetFieldAlignRight(4); // row 4 is numeric and should align to the right
$allmembers = new cMemberGroup;
$allmembers->LoadMemberGroup();
foreach($allmembers->members as $member) {
if($member->account_type == "F") // Skip fund accounts
continue;
$history = new cLoginHistory;
if(! $history->LoadLoginHistory($member->member_id)) { // Have they logged in?
$join_date = new cDateTime($member->join_date);
$data = array($member->PrimaryName(), $join_date->ShortDate(), $member->AllPhones(), $member->AllEmails());
$table->AddSimpleRow($data);
}
}
$output = $table->DisplayTable();
if($output == "")
$output = "All members in the system have logged in at least once.";
$p->DisplayPage($output);
?>