public
Created

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9 10
$email = isset($comment->comment_author_email) ? $comment->comment_author_email : null;
 
if ( !$email && !is_integer($id_or_email) ) {
$email = $id_or_email;
}
 
if ( !$email && is_integer($id_or_email) ) {
$user = get_userdata($id_or_email);
$email = $user->user_email;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.