Blue
Red
Green
Orange
Voilet
Slate
Dark

Hide email adress from guests

Admin

Administrator
Staff member
Joined
Apr 3, 2022
Messages
389
Reaction score
53
Points
28
Hide email addresses from guests - Hide email addresses from guests

This tutorial will show you how to hide email addresses from guests.
Go to your ftp > library/XenForo/BbCode/Formatter/Base.php and find:

Code:
$email = XenForo_Helper_String::censorString($email);

and add below to hide for guests:

Code:
$visitor = XenForo_Visitor::getInstance();
if (!isset($visitor['user_id']) || $visitor['user_id'] == 0) {
$link =  XenForo_Link::buildPublicLink("register");
return 'Thank you <a href="' . $link . '">to register/login</a> to see the'e-mail adress';
}

Save and done.

Good luck.
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock    No Thanks