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

Reply via email to