Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ...

share|improve this question
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). – Greg Grinberg Jan 23 '13 at 15:17
@grigriforce I have updated my Question... !! – Javascript Coder Jan 25 '13 at 7:16
up vote 2 down vote accepted

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

share|improve this answer
+1 for your answer... – Javascript Coder Jan 25 '13 at 7:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.