notification on off widget

This commit is contained in:
2026-08-14 08:04:22 +02:00
parent 1dbb93b139
commit 5f2137d8ec
2 changed files with 20 additions and 1 deletions
@@ -9,6 +9,19 @@ if (!isset($pdo)) {
$pdo = DBHandlerSelect::getInstance()->getConnection();
}
if (!isset($pdo)) {
$pdo = DBHandlerSelect::getInstance()->getConnection();
}
/* Check user webapp notification preference */
$__notifyStmt = $pdo->prepare("SELECT notify_webapp FROM auth_users WHERE id = ? LIMIT 1");
$__notifyStmt->execute([(int)$iduserlogin]);
if ((int)$__notifyStmt->fetchColumn() !== 1) {
return;
}
$__trWidgetHr = isset($user)
$__trWidgetHr = isset($user)
&& ( $user->hasRole('Admin')
|| $user->hasRole('Superuser')