[Cosmo-dev] account activation link persistence

Randy Letness randy at osafoundation.org
Thu Nov 16 18:59:44 PST 2006


Travis Vachon wrote:
>
> 2. Create a new datastructure specifically for these activation ids. 
> This would be a table that mapped activation ids to a usernames and 
> expiration dates (or creation dates). The only downside to this is 
> that it should be done before the upcoming sharing data model branch 
> so I don't have to work on this feature in the branch. I don't 
> anticipate this taking too long, but I'll have to dig deeper into 
> hibernate (I ain't scerr'd ;) ). At the very least, I'd like a sanity 
> check before jumping waist deep into this.
>
> In either case, I'd also like to keep track of a seed number for the 
> activation id that is incremented each time a user signs up to avoid 
> activation id collisions. Is there any reason not to use a 
> ServerProperty for this?
>
What about storing a hash in the User record?  You can use a generated 
UUID for this, as there is very little chance for collision.  Then you 
look up the user by this id, and you can use isActivated (boolean) and 
creationDate to determine expiration.  This seems too simple, am I 
missing something?

-Randy


More information about the cosmo-dev mailing list