Mask usernames? [message #39325] |
Wed, 17 October 2007 20:57 |
pgregg
Messages: 14 Registered: July 2006
Karma: 0
|
Junior Member |
|
|
I've integrated FUD into a tech support website using a single sign on - BUT - the users login with their email address which is great except that posts now give away the customer's email address.
I understand that you can use the "alias" feature to hide this, but not all users do this, so what I would like to do in the output is to filter the username through a function by replacing their domain name with ****. I can write the function / preg_replace no problem - I just need to know where to put it and call it.
Thanks,
PG
|
|
|
Re: Mask usernames? [message #39360 is a reply to message #39325] |
Fri, 19 October 2007 00:07 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Most of the user name renderings are done via the draw_user_link() function inside ulink.inc.t. So that would be the best place for your regex.
FUDforum Core Developer
|
|
|
|
Re: Mask usernames? [message #39396 is a reply to message #39381] |
Sun, 21 October 2007 15:48 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You are correct, the function is not used in all places, but it is a good place to start since most key pages, like member list, message display and "who's online" already use it. The two places that don't, the "last post bit" and the user profile page, can be modified to use that function as well for output.
I wouldn't put any code into globals.php as it is a predominantly a configuration file. Any super-common functions should be put inside core.inc inside the include directory.
FUDforum Core Developer
|
|
|
|
Re: Mask usernames? [message #39447 is a reply to message #39404] |
Mon, 22 October 2007 22:51 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Hrm you're right, I guess I didn't convert the code to use the method yet. So for now you'll need to patch drawmsg.tmpl and drawpmsg.tmpl as well. Sorry.
FUDforum Core Developer
|
|
|