Closed tremby closed 7 years ago
Good thinking. This is somehow similar to the situation when user disconnects all the backends and exists as a soap bubble waiting to burst.
I think PSA doesn't provide anything out-of-the box to deal with either, so it's all up to the app you're implementing. Generate fake uid, don't let users log in if there's no password or specific flag set, that's it, I guess…
This falls out of the this library responsibilities.
Is there any existing backend to support a "temporary" user? This isn't a good word for it -- let me explain what I'm looking for:
While I want information a given user enters to be stored in a user record, and for them to be treated as if they are logged in, I don't want to require them to log in with a social account or to make a password. They'd be remembered as logged in, and so associated to their row in the users table for now, via session or cookie. While still logged in they have the option to register (i.e. set a password to go with their email address, or log in to a social account to become associated) so they can log back in later. If they don't do this their record would still be stored but they (probably?) wouldn't be able to become reassociated with it at a later time.
I suspect I may be able to use the "email" backend for this and just not set a password, since I'll be collecting email addresses anyway. What I'm not clear on is how feasible this is, and whether I'd then easily be able to allow the user to add a password or associate a social account with the already-logged-in account.
Any guidance would be greatly appreciated.