Maybe something like this:

def reset_password():
    user = db.auth_user(email=request.vars.email)
    if user:
        return 'success' if auth.email_reset_password(user) else 'failure'
    else:
        return 'invalid email address'

You would send a request like 
/myapp/mycontroller/[email protected], and it should return 
one of those three status messages.

Anthony

On Thursday, July 4, 2013 8:49:21 AM UTC-4, Vikas Gupta wrote:
>
> The client I am using is android, hence cant use web based forms. e.g. 
> currently i am working on the request reset password. The client will 
> capture the email id and call a controller function with email id as an 
> argument. That function basically should send an email to the user  with a 
> link to reset the password. I called request_reset_password from the tools 
> package, but that returns a form. How can I process this form, pass the 
> arguments, read the return value or error messages back, all 
> programatically in the controller function and then send the status back to 
> the client.
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to