ent 9722 expired license notifications

This commit is contained in:
edu.corral 2022-11-03 13:55:06 +01:00
parent 5eee3ade4a
commit fb4b42e6c5
2 changed files with 5 additions and 3 deletions

View File

@ -834,7 +834,7 @@ function update_user(string $id_user, array $values)
'id_user' => $id_user,
]
);
} else {
} else if ((int) $notification['id'] === 1 || (int) $notification['id'] === 5) {
@db_process_sql_insert(
'tnotification_source_user',
[

View File

@ -845,7 +845,9 @@ class ConsoleSupervisor
}
// Expiry.
if (($days_to_expiry <= 15) && ($days_to_expiry > 0) && (is_user_admin($config['id_user']))) {
if (($days_to_expiry <= 15) && ($days_to_expiry > 0)
&& ((is_user_admin($config['id_user'])) || (check_acl($config['id_user'], 0, 'PM')))
) {
if ($config['license_mode'] == 1) {
$title = __('License is about to expire');
$msg = 'Your license will expire in %d days. Please, contact our sales department.';
@ -866,7 +868,7 @@ class ConsoleSupervisor
'url' => '__url__/index.php?sec=gsetup&sec2=godmode/setup/license',
]
);
} else if (($days_to_expiry < 0) && (is_user_admin($config['id_user']))) {
} else if (($days_to_expiry <= 0) && ((is_user_admin($config['id_user'])) || (check_acl($config['id_user'], 0, 'PM')))) {
if ($config['license_mode'] == 1) {
$title = __('Expired license');
$msg = __('Your license has expired. Please, contact our sales department.');