Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Userprofile management > is end user reg...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 240 of 267
Post > Topic >>

is end user registered?

by =?Utf-8?B?amFycmV0dGU=?= <jarrette@[EMAIL PROTECTED] > Sep 15, 2006 at 02:23 PM

I'm having an issue which should be pretty simple to solve.  I want the "i 
accept terms" button on my user terms page to redirect to the
myaccount.aspx 
page if the current user is logged in with an account but back to the home

page if they aren't logged in.  The problem I get is when the user profile
is 
empty and I don't have it instatiated.  I suck at C# and wanted to know if

anyone could tell me an easy way to get this done....

UserObject userProfile = UserObject.CurrentUser;
if(userProfile.IsAnonymous)
{
   Response.Redirect("Default.aspx");
}
else
{
   Response.Redirect("MyAccount.aspx");
}


this code only works if they are logged in, if they aren't i get an error 
saying
"Object reference not set to an instance of an object"
 




 3 Posts in Topic:
is end user registered?
=?Utf-8?B?amFycmV0dGU=?=   2006-09-15 14:23:02 
Re: is end user registered?
"Joseph Johnson"  2006-09-18 16:38:30 
Re: is end user registered?
=?Utf-8?B?amFycmV0dGU=?=   2006-09-19 08:26:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 17:56:34 CST 2008.