Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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
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). –  Greg Grinberg Jan 23 '13 at 15:17
    
@grigriforce I have updated my Question... !! –  Learner Jan 25 '13 at 7:16
add comment

1 Answer

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... –  Learner Jan 25 '13 at 7:54
add comment

Your Answer

 
discard

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.