diff options
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r-- | phpBB/includes/functions_messenger.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index e580f6b675..a646f35fdd 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -55,6 +55,24 @@ class messenger $this->vars = $this->msg = $this->replyto = $this->from = ''; $this->mail_priority = MAIL_NORMAL_PRIORITY; } + + /** + * Set addresses for to/im as available + * + * @param array $user User row + */ + function set_addresses($user) + { + if (isset($user['user_email']) && $user['user_email']) + { + $this->to($user['user_email'], (isset($user['username']) ? $user['username'] : '')); + } + + if (isset($user['user_jabber']) && $user['user_jabber']) + { + $this->im($user['user_jabber'], (isset($user['username']) ? $user['username'] : '')); + } + } /** * Sets an email address to send to |