I have a page of my website.. In that page I have a registration forms and videos and some text... When I register in registration page and then come back to this page already registered, then registration box disappears.. It looks I have left my rendered tags set to hide the reg form if they are logged in.

Code I am using for that --

<c:HomePageRightReglanding rendered="{!ISPICKVAL($User.UserType,'Guest')}" />

HomePageRightReglanding my component name where I have form to display ...

  • 1
    Your question is a bit unclear. Can you clarify what is the expected behaviour (what you want to happen) and what is the actual behaviour (what is happening). Jan 23, 2013 at 15:17
  • @grigriforce I have updated my Question... !! Jan 25, 2013 at 7:16

1 Answer 1


Why dont you create ax extra custom boolean field on the User object like "Registered__c". By default it is "false" and after registration it is "true" (after log-off it is "false" again). And handle your component visibility based on that field:

public class YourClass{

    public User currentUser { get; set; }

    public YourClass(){
        currentUser = [ Select Registered__c From User Where Id = UserInfo.getUserId() ];

<c:HomePageRightReglanding rendered="{!currentUser.Registered__c}" />

Or try to use Userinfo.getSessionId(). If the user is registered, he must get an Sesion-ID so Userinfo.getSessionId() = true


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .