Yes, still unresolved.

I did a workaround for the request_reset_password: 

def user(): 
    if request.args(0)=='request_reset_password':
        redirect(URL('default','myrequestpass'))
    return dict(form=auth())

def myrequestpass():
    form = SQLFORM.factory(
        Field('u_email', requires =[IS_EMAIL(error_message='Wrong email'), 
IS_IN_DB(db, 'auth_user.email', error_message='Address not in DB')]),
              table_name='solicitar_pass')
    if form.process().accepted:
        user = db(db.auth_user.email==form.vars.u_email).select().first()
        session.flash = 'Comprueba tu correo '+str(user.first_name)
        u_passwd = str(hex(int(time.time())))[2:]
        user.update_record(password=CRYPT()(u_passwd.encode('utf8'))[0])
        mensaje='<html> <h4>Retrieve your password</h4> Temporal password : 
<strong> '+ u_passwd   +' </strong> <p> Login with the temporal password 
and set your new password in this link :</p><p><a 
href="https://yoursite.com/user/login?_next=/user/change_password";>Change 
Password</a></p><br></html>''
        mail.send(to=[form.vars.u_email],
        subject='Change your password, follow this link',
        message=mensaje)
        redirect(URL('default','index'))
    elif form.errors:
        response.flash = 'Wrong Email address'
    return dict(form=form)


But anyway the lazyT found is an annoying error width, for instance: auth.
settings.auth_two_factor_enabled = True


El jueves, 30 de marzo de 2017, 8:13:06 (UTC+2), Karoly Kantor escribió:
>
> As the issue is still unresolved, i have unchecked the "no action needed" 
> flag on this topic. Any help would be appreciated. Thank you.
>
> On Thursday, March 30, 2017 at 6:33:07 AM UTC+2, Karoly Kantor wrote:
>>
>> This issue still seems to be unsolved. I have a fresh installation on 
>> GAE, reset password emails fail due to "need string or buffer, lazyT 
>> found"
>>
>> Is there something I can do?
>>
>> Thanks.
>>
>> On Friday, July 29, 2016 at 7:49:14 AM UTC+2, webm...@trytha.com wrote:
>>>
>>> I just uploaded an updated version of web2py to my server, replacing a 
>>> much older version (likely 2.12.2), and now it won't send password recovery 
>>> emails.  The error in the logs is: 
>>>
>>> Mail.send failure:coercing to Unicode: need string or buffer, lazyT 
>>> found
>>>
>>> This suggests to me that somehow a string is not properly being passed. 
>>>  I gather that lazyT has something to do with the built-in translation 
>>> capabilities of web2py?  Probably don't need to be translating email 
>>> addresses (though I guess it could be trying to translate the recovery 
>>> message).  Either way, GAE wants nothing to do with it.
>>>
>>> How can I fix this?
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to