Added email confirmation with redirect.

Poprawione.

2014-12-05 12:51 GMT+01:00 Ludwik Trammer <notifications@github.com>:

> In addons/email_confirmation/models.py:
>
> > +            url = url.replace(query=werkzeug.url_encode(querydict))
> > +            urls[partner_id] = url.to_url()
> > +        return urls
> > +
> > +
> > +class Users(models.Model):
> > +    _inherit = "res.users"
> > +
> > +    @api.model
> > +    def authenticate_after_confirmation(self, values, token=None):
> > +        if token:
> > +            # signup with a token: find the corresponding partner id
> > +            partner = self.env['res.partner']._signup_retrieve_partner(token, check_validity=True, raise_exception=True)
> > +            # invalidate signup token
> > +            partner.write({'signup_token': False, 'signup_type': False, 'signup_expiration': False})
> > +            # authenticate user
>
> Chyba "activate user"? Autentykacja była przeprowadzona wyżej.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/EE/bestja/pull/32/files#r21368244>.
>