Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fb8d26a5
authored
2011-03-10 14:45:12 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
using the email_address_preference for notifications
1 parent
b746e78d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
com/Notifications/Notifications.php
com/Notifications/Notifications.php
View file @
fb8d26a
...
...
@@ -248,7 +248,20 @@ function send_email($uid = 0, $contents,$args, $override = false) {
$to_email
=
$args
[
'email'
];
}
else
{
$user
=
new
WP_User
(
$uid
);
$to_email
=
$user
->
user_email
;
$email_address_preference
=
get_user_meta
(
$user
->
ID
,
'email_address_preference'
,
true
);
if
(
empty
(
$email_address_preference
))
{
$to_email
=
$user
->
user_email
;
}
else
{
$pp
=
strtolower
(
$email_address_preference
)
.
"_"
;
$to_email
=
get_user_meta
(
$user
->
ID
,
$pp
.
'email'
,
true
);
if
(
empty
(
$to_email
))
{
$to_email
=
$user
->
user_email
;
}
}
}
$from_address
=
get_bloginfo
(
'admin_email'
);
...
...
Please
register
or
sign in
to post a comment