|
@@ -100,7 +100,7 @@ discard block |
|
|
block discarded – undo |
|
100
|
100
|
$controller->restrictAccess(!in_array($to, ['all', 'never_logged', 'last_6mo']) || Auth::isAdmin()); |
|
101
|
101
|
$controller->pageHeader(); |
|
102
|
102
|
|
|
103
|
|
-$to_names = implode(I18N::$list_separator, array_map(function(User $user) { return $user->getRealName(); }, recipients($to))); |
|
|
103
|
+$to_names = implode(I18N::$list_separator, array_map(function (User $user) { return $user->getRealName(); }, recipients($to))); |
|
104
|
104
|
|
|
105
|
105
|
?> |
|
106
|
106
|
<h2><?= I18N::translate('Send a message') ?></h2> |
|
@@ -185,13 +185,13 @@ discard block |
|
|
block discarded – undo |
|
185
|
185
|
*/ |
|
186
|
186
|
function recipients($to) { |
|
187
|
187
|
if ($to === 'all') { |
|
188
|
|
- $recipients = User::all(); |
|
|
188
|
+ $recipients = User::all(); |
|
189
|
189
|
} elseif ($to === 'last_6mo') { |
|
190
|
|
- $recipients = array_filter(User::all(), function(User $user) { |
|
|
190
|
+ $recipients = array_filter(User::all(), function (User $user) { |
|
191
|
191
|
return $user->getPreference('sessiontime') > 0 && WT_TIMESTAMP - $user->getPreference('sessiontime') > 60 * 60 * 24 * 30 * 6; |
|
192
|
192
|
}); |
|
193
|
193
|
} elseif ($to === 'never_logged') { |
|
194
|
|
- $recipients = array_filter(User::all(), function(User $user) { |
|
|
194
|
+ $recipients = array_filter(User::all(), function (User $user) { |
|
195
|
195
|
return $user->getPreference('verified_by_admin') && $user->getPreference('reg_timestamp') > $user->getPreference('sessiontime'); |
|
196
|
196
|
}); |
|
197
|
197
|
} else { |
Please login to merge, or discard this patch.