function _subscriptions_suspended_alert in Subscriptions 2.0.x
Same name and namespace in other branches
- 6 subscriptions.admin.inc \_subscriptions_suspended_alert()
- 7 subscriptions.admin.inc \_subscriptions_suspended_alert()
Helper function to display a message to the user if notifications are suspended.
Parameters
int $uid:
bool $suspended:
1 call to _subscriptions_suspended_alert()
- subscriptions_suspended in ./
subscriptions.module.old.php - Returns whether notifications are suspended for the given user, and optionally alerts the user if delivery is suspended.
File
- ./
subscriptions.admin.old.php, line 548 - Subscriptions module (load-on-demand admin functions).
Code
function _subscriptions_suspended_alert($uid, $suspended) {
$path2 = url("user/{$uid}/subscriptions/overview", array(
'fragment' => 'edit-suspend',
));
switch ($suspended) {
case 2:
$msg = t('Your subscriptions have been suspended because your e-mail address did not work anymore!');
if (!(subscriptions_arg(0) == 'user' && subscriptions_arg(1, 'uid') == $uid && subscriptions_arg(2) == 'edit')) {
drupal_set_message($msg . '<br />' . t('Please go <a href="@path1">here</a> to update your e-mail address and then <a href="@path2">here</a> to resume delivery of your notifications.', array(
'@path1' => url("user/{$uid}/edit"),
'@path2' => $path2,
)), 'error', FALSE);
}
else {
drupal_set_message($msg . '<br />' . t('Please correct/verify your e-mail address below and then go <a href="@path2">here</a> to resume delivery of your notifications.', array(
'@path2' => $path2,
)), 'error', FALSE);
}
break;
case 1:
drupal_set_message(t('Your subscriptions are suspended. Please go <a href="@path2">here</a> to resume delivery of your notifications.', array(
'@path2' => $path2,
)), 'warning', FALSE);
break;
}
}