[Bps-public-commit] r20184 - RT-BugTracker-Public/html/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Fri Dec 4 05:16:40 EST 2009
Author: ruz
Date: Fri Dec 4 05:16:34 2009
New Revision: 20184
Added:
RT-BugTracker-Public/html/Elements/ShowUserPublic
Log:
* first implementation of ShowUserPublic, a special user
formating style for email protection
Added: RT-BugTracker-Public/html/Elements/ShowUserPublic
==============================================================================
--- (empty file)
+++ RT-BugTracker-Public/html/Elements/ShowUserPublic Fri Dec 4 05:16:34 2009
@@ -0,0 +1,21 @@
+<% $Address || $User->RealName || $User->Name %>\
+<%ARGS>
+$User => undef
+$Address => undef
+</%ARGS>
+<%INIT>
+if ( !$User && $Address ) {
+ $User = RT::User->new( $session{'CurrentUser'} );
+ $User->LoadByEmail( $Address->address );
+ if ( $User->Id ) {
+ $Address = '';
+ } else {
+ $Address = $Address->address;
+ }
+} else {
+ $Address = $User->EmailAddress;
+}
+if ( $Address && RT::BugTracker::Public->IsPublicUser ) {
+ $Address =~ s/@/ [...] /;
+}
+</%INIT>
More information about the Bps-public-commit
mailing list