This get_or_insert is what creates the Account models. It is the only place
they are created.


On Thu, Jun 6, 2013 at 9:12 PM, David Thomas <notifications@github.com>wrote:

> In helpers/user_bundle.py:
>
> > @@ -16,7 +16,8 @@ def account(self):
> >              self._account = Account.get_or_insert(
> >                  self.user.user_id(),
> >                  email = self.user.email(),
> > -                nickname = self.user.nickname())
> > +                nickname = self.user.nickname(),
> > +                registered = False)
>
> Sure. Basically, when a user "signs in", it automatically creates a user
> account (somewhere, I still haven't figured it out. maybe cookies?) but
> doesn't persist to the datastore. At first I was just doing a check to see
> if their user account existed, but apparently logging in automatically
> creates an account. So I figured that setting registered to False then
> automatically changing it to True on registration (which is when it's
> pushed to the datastore) would get around that problem.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/gregmarra/the-blue-alliance/pull/650/files#r4582829>
> .
>