function Notifications_Subscription::set_user in Notifications 7
Set user account as the owner of this subscription and take care of defaults for this account.
Parameters
$account: User account or user uid
1 call to Notifications_Subscription::set_user()
- Notifications_Subscription::check_account in ./
notifications.subscription.inc - Check subscription user account and related parameters
File
- ./
notifications.subscription.inc, line 997 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription
- Common base for subscription type and subscription instance
Code
function set_user($account) {
$account = messaging_user_object($account);
$this->uid = $account->uid;
if (!isset($this->send_interval)) {
$this->send_interval = notifications_user_setting('send_interval', $account, 0);
}
if (!isset($this->send_method)) {
$this->send_method = notifications_user_setting('send_method', $account);
}
if (empty($this->language)) {
$this->language = user_preferred_language($account)->language;
}
return $this;
}