You are here

function pm_email_notify_user_update in Privatemsg 7.2

Same name and namespace in other branches
  1. 7 pm_email_notify/pm_email_notify.module \pm_email_notify_user_update()

Implements hook_user_update().

1 call to pm_email_notify_user_update()
pm_email_notify_user_insert in pm_email_notify/pm_email_notify.module
Implements hook_user_insert().

File

pm_email_notify/pm_email_notify.module, line 382
Notifies users about new Private Messages via Email.

Code

function pm_email_notify_user_update(&$edit, $account, $category) {
  if (isset($edit['pm_email_notify_level'])) {
    privatemsg_set_setting('user', $account->uid, 'email_notify_level', $edit['pm_email_notify_level']);
    unset($edit['pm_email_notify_level']);
  }
  if (isset($edit['pm_email_only_user'])) {
    privatemsg_set_setting('user', $account->uid, 'email_notify_only_user', $edit['pm_email_only_user']);
    unset($edit['pm_email_only_user']);
  }
  if (isset($edit['pm_show_sender_mail'])) {
    privatemsg_set_setting('user', $account->uid, 'show_sender_mail', $edit['pm_show_sender_mail']);
    unset($edit['pm_show_sender_mail']);
  }
}