Group registration requests in a single line for users without detailed_notif
This commit is contained in:
parent
8357d94800
commit
2055ee872c
14
mod/ping.php
14
mod/ping.php
|
@ -289,6 +289,7 @@ function ping_init(App $a)
|
|||
}
|
||||
|
||||
if (DBA::isResult($regs)) {
|
||||
if (count($regs) <= 1 || DI::pConfig()->get(local_user(), 'system', 'detailed_notif')) {
|
||||
foreach ($regs as $reg) {
|
||||
$notif = [
|
||||
'id' => 0,
|
||||
|
@ -302,6 +303,19 @@ function ping_init(App $a)
|
|||
];
|
||||
$notifs[] = $notif;
|
||||
}
|
||||
} else {
|
||||
$notif = [
|
||||
'id' => 0,
|
||||
'href' => DI::baseUrl() . '/admin/users/pending',
|
||||
'name' => $regs[0]['name'],
|
||||
'url' => $regs[0]['url'],
|
||||
'photo' => $regs[0]['micro'],
|
||||
'date' => $regs[0]['created'],
|
||||
'seen' => false,
|
||||
'message' => DI::l10n()->t('{0} and %d others requested registration', count($regs) - 1),
|
||||
];
|
||||
$notifs[] = $notif;
|
||||
}
|
||||
}
|
||||
|
||||
// sort notifications by $[]['date']
|
||||
|
|
Loading…
Reference in a new issue