Anyone knows how to use the $user.username data object?I really need it,thx> 
From: [EMAIL PROTECTED]> To: [email protected]> Subject: $user reference & 
authenticate commentor> Date: Wed, 25 Apr 2007 19:02:54 +0000> > Dear all,> > I 
am new to Roller so excuse if my request is stupid. > > I am using Roller 3.0 
with an Active Directory on Jboss 4.> > Like many other users I would like that 
people who put> comments have to authenticated.> > > > Apparently, the solution 
I saw in the previous mails (mail> “Module for user registration before posting 
reactions” from last February) is> not very easy.> > What I would like to do is 
simply modify the the blog by> detecting if the user who wants to put a comment 
is logged in or not. If yes, he> will be able to add comments if no, the 
comments form won’t be displayed and> instead there will be a message like: 
“Please loggon before you can put a> comment”. > > Thus, I thought I just have 
to modify the Weblog.vm of my> theme by adding a few lines of code in this part 
of the .vm file:> > > > #if ($model.permalink)> >                         
#showWeblogEntryComments($entry)> >                         
#if($user.userName!=NULL)> >                                     
#showWeblogEntryCommentForm($entry)> >                         #end> >          
               #else> >                                     <b>Please> Loggin 
first</b>> >                         #end> > #end> > But my problem if that if 
I simply add $user.useName (no #if> and #else) as suggested in thetemplate 
guide I have the error “$user.userName> is not a valid reference”. I have tried 
with $model.user.Username,> $model.weblog.user.userName and many others but 
none of them works….> > > > Can someone tell me how to use the $user data 
object> please???? Or is there another attribute that can tell me if the 
current user> is logged in?? > > Thx,> > Ben.> > > 
_________________________________________________________________> Essayez 
Live.com, votre nouvelle page d'accueil ! Personnalisez-la en quelques clics 
pour retrouver tout ce qui vous intéresse au même endroit.> 
http://www.live.com/getstarted
_________________________________________________________________
Essayez Live.com et créez l'Internet qui vous ressemble : infos, sports, météo 
et bien plus encore !
http://www.live.com/getstarted

Reply via email to