fortunately the password doesn't get stored in plain text on web2py :D You 
need to apply CRYPT() before comparing. Read more about that on the book.

On Friday, August 26, 2016 at 3:31:54 PM UTC+2, Steve Joe wrote:
>
> IN PHONEGAP:
>
> <form action="https://#someurl#.pythonanywhere.com/welcome/phonegap/login
> ">
>   username:<br>
>   <input type="text" name="username" value="username">
>   <br>
>   Password:<br>
>   <input type="password" name="password" value="">
>   <br><br>
>   <input type="submit" value="Submit">
> </form>
>
>
> IN WEB2PY:
>
> def login():
>     k="false"
>     if db(db.auth_user.username == request.vars.username and 
> db.auth_user.password == request.vars.password).select():
>         k="true"
>     return locals()
>
> and in view I can see:
>
> <Storage {'username': 'shinchan', 'password': '1156'}> false 
> which means I got k as false.
>
> The username and pasword are correct according to my database but I can't 
> login. What should I do?
>

-- 
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