473,549 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving profile information for a specific user when not logged in

I want to be able to store profile information for a user when they
sign up for an account...but BEFORE they can log in. Can this be done
using any of the built-in profile methods?

Here's my current sign-up procedure:

1. User creates an account with username, password, e-mail and other
information that I want to store in profile.

2. User is created as inactive and NOT logged in. Besides the profile
stuff, I use the membership object to accomplish this. I want to
store profile information right here while they are NOT logged in.

3. I send an e-mail to the user with an activate link. The link is to
an activate page with the UserId guid added as a querystring.

4. After visiting the activate link (and thus validating their e-mail
account) they are activated. I read the guid from the querystring.
Using the membership object, I look up the user by the guid and
activate them.

I'm using a custom SQLTableProvide r for the profile info (storing in
separate columns), so I know I could just use my custom sprocs to
insert the data. But I was wondering if I could do so using the
default provider object. None of my profile items allow anonymous. I'm
wondering if I can load a profile for a specific user and set the
properties.

Thanks,

Jason

Apr 30 '07 #1
3 2170
Short answer:
<system.web>
<anonymousIdent ification enabled="true"/>
<trust level="Medium"/>
<profile >
<properties>
<add name="Name" allowAnonymous= "true" />
<add name="Age" allowAnonymous= "true" type="System.In t16"/>
</properties>
</profile>
<compilation debug="true"/>
</system.web>

--Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"daokfella" wrote:
I want to be able to store profile information for a user when they
sign up for an account...but BEFORE they can log in. Can this be done
using any of the built-in profile methods?

Here's my current sign-up procedure:

1. User creates an account with username, password, e-mail and other
information that I want to store in profile.

2. User is created as inactive and NOT logged in. Besides the profile
stuff, I use the membership object to accomplish this. I want to
store profile information right here while they are NOT logged in.

3. I send an e-mail to the user with an activate link. The link is to
an activate page with the UserId guid added as a querystring.

4. After visiting the activate link (and thus validating their e-mail
account) they are activated. I read the guid from the querystring.
Using the membership object, I look up the user by the guid and
activate them.

I'm using a custom SQLTableProvide r for the profile info (storing in
separate columns), so I know I could just use my custom sprocs to
insert the data. But I was wondering if I could do so using the
default provider object. None of my profile items allow anonymous. I'm
wondering if I can load a profile for a specific user and set the
properties.

Thanks,

Jason

Apr 30 '07 #2
Yes, that will allow me to store profile information. But how does
that create a profile record with the same userId as the membership I
just created?

Apr 30 '07 #3
It doesn't and you don't. You use the MigrateAnonymou s event:

http://msdn2.microsoft.com/en-us/lib...anonymous.aspx
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"daokfella" wrote:
Yes, that will allow me to store profile information. But how does
that create a profile record with the same userId as the membership I
just created?

Apr 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3623
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore my settings if my profile became tampered with or corrupt. Is there any sample code available out there? -Robert
0
1507
by: kehmka | last post by:
Hello, I need to understand the full scope of changing the Profile.UserName property when a user goes from anonymous to authenticated. It's read-only and essential to acquiring profile information. I'm implementing both a custom Membership and Profile provider. I memtion this because I'm using the UserName passed in through...
1
1093
by: Arnie | last post by:
How can I access Profile information for a non-logged-in user from an app_code business object? I can get Profile info for the logged -in user via HttpContext.Current.Profile. I can get Membership info for any user via System.Web.Security.Membership.GetUser("Username") Older docs reference Profile.GetProfile('username"), but I can't...
6
2212
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base class would have CurrentUser property that would hold customer class in session and that was fine for all my situations. Now ASP.NET 2.0 came...
1
1392
by: Giovanni | last post by:
Dear Friends, I am having problems with the following: I have added a Login control to a web page. In the Login control's Authenticate event, I am performing additional validation against our database to make sure a user exists. If all goes well, I set the e.Authenticated property equal to True. At the same time, (while still in the...
6
8104
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a picture of themselves to their profile... I admit that I'm a newbie... but this is how I understand this:
1
3526
by: Rusty Hill | last post by:
My site does not allow anonymous users. After a user has logged in and been authenticated I need to access some information in their profile object. I thought I would do this in the LoggedIn event of the Login object but when that event fires the user is still not authenticated so the profile is null. Where and how should I be doing this? ...
1
1999
by: kpg* | last post by:
Hi all, Trying to use the ASP.NET 2.0 membeship API to manage users and user profiles, and of course, to provide role based security to my web app. I have several attributes I want to users, companyID for example, so I'm using the profile feature to do this and it works great. Now the problem:
0
1119
by: TimVtoo | last post by:
Hi. I want administrators in my intranet application to be able to create new users and save Profile information (such as FirstName, LastName etc.) without having to login as that user. I can save profile properties for the currently logged in user like so: Profile.SetPropertyValue("FirstName", firstName.Text) But how can an administrator do...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7808
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.