function pm_email_notify_user_update in Privatemsg 7
Same name and namespace in other branches
- 7.2 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 117 - Notifies users about new Private Messages via Email.
Code
function pm_email_notify_user_update(&$edit, $account, $category) {
if (isset($edit['pm_send_notifications']) && privatemsg_user_access('read privatemsg', $account)) {
db_merge('pm_email_notify')
->fields(array(
'email_notify_is_enabled' => $edit['pm_send_notifications'],
))
->key(array(
'user_id' => $account->uid,
))
->execute();
}
}