[nycphp-talk] design question: user self-registration
gatzby3jr at gmail.com
Tue Aug 31 16:15:07 EDT 2010
Can you insert the new user, associate it with the existing person, and
still make them activate the email address?
On Tue, Aug 31, 2010 at 4:03 PM, David Mintz <david at davidmintz.org> wrote:
> On Tue, Aug 31, 2010 at 3:13 PM, Chris Snyder <chsnyder at gmail.com> wrote:
>> On Tue, Aug 31, 2010 at 12:43 PM, David Mintz <david at davidmintz.org>
>> > What would you do?
>> > Gratefully yours....
> All interesting, thank you. I think I still might not be explaining the
> situation clearly enough. Or I am dense and not getting it.
> The form I am gonna display is bound -- so to speak -- to two tables.
> Actually I'm using Zend Framework and MySQL and Zend_Form_SubForm. I don't
> know until I see their email whether this is someone whose information has
> already been put in the people table. Usually it will not be, they will be
> entirely new to the application.
> In the typical case, filter and validate and attempt insert, marking the
> records 'inactive' until we confirm the email by sending them a link with a
> token as URL parameter, they click it, bla bla, all good.
> If however I catch a duplicate email exception when I attempt the insert
> into 'people,' then I know this is most likely a person we've dealt with but
> who has never created an actual user account -- a row in users as opposed to
> people. IOW there is a record in 'people' that has this email address, but
> there is no corresponding row in users. Now, I might go ahead and run an
> update of the old row -- indeed MySQL provides ON DUPLICATE KEY UPDATE
> syntax for just this situation. But I don't want to do that until I have
> confirmed their email. So... I think I just need to hold onto their input
> pending email verification.
> Thanks again.
> Support real health care reform:
> David Mintz
> New York PHP Users Group Community Talk Mailing List
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk