Usually the user is identified by user_name not by email, you sure you are
talking about email?

On Mon, Nov 14, 2016 at 12:17 PM, Bastien Sevajol <[email protected]
> wrote:

> Hello,
> I have troubles with changing email of current connected user. Actually i
> do:
>
> user.email = '<new_email>'
> session.flush()  # sqlalchemy session
> tg.request.identity['repoze.who.userid'] = '<new_email>'
> tg.redirect(tg.url('/home'))
>
> But in next request, *tmpl_context.current_user* value is *None*. If i
> take a look into *environ.get('repoze.what.credentials', {})* i can see
> into it:
>
> 'repoze.what.userid' (140619320361944) = {str} 'PREVIOUS EMAIL'
> 'repoze.who.plugins.auth_tkt.userid' (140618921894024) = {str} 'PREVIOUS
> EMAIL'
> 'repoze.who.userid' (140618921927208) = {str} 'PREVIOUS EMAIL'
>
> How can i change current connected user email and "refresh" credentials ?
>
> Thank's a lot,
> Bastien.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to