1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

Merge pull request #3206 from oudoken/master

Fixes #3150 Allow logged in user to view email address.
This commit is contained in:
Cameron
2018-07-16 11:54:53 -07:00
committed by GitHub

View File

@@ -265,24 +265,30 @@ class user_shortcodes extends e_shortcode
function sc_user_email($parm='') function sc_user_email($parm='')
{
$tp = e107::getParser();
$aCurUserData = e107::user(USERID);
if( ($this->var['user_hideemail'] && !ADMIN ) && ( $this->var['user_email']!=$aCurUserData['user_email'] ) )
{ {
return "<i>".LAN_USER_35."</i>";
$tp = e107::getParser(); }
else
if($this->var['user_hideemail'] && !ADMIN) {
{ if($this->var['user_email']!=$aCurUserData['user_email']){
return "<i>".LAN_USER_35."</i>";
}
else
{
return $tp->emailObfuscate($this->var['user_email']); return $tp->emailObfuscate($this->var['user_email']);
//list($user,$dom) = explode('@', $this->var['user_email']); //list($user,$dom) = explode('@', $this->var['user_email']);
//return "<span class='e-email' data-user='".$user."' data-dom='".$dom."'>&#64;</span>"; //return "<span class='e-email' data-user='".$user."' data-dom='".$dom."'>&#64;</span>";
}else{
return $this->var['user_email'];
} }
} }
}
/** /**
* USER_ICON Shortcode * USER_ICON Shortcode