Thank you so much
I will test it this evening
But I will say to you Thanks even if something is wrong
I will publish the results tomorrow evening
Regards
Le jeudi 13 juin 2019 17:14:09 UTC+2, 黄祥 a écrit :
>
> pls try (not tested)
>
>> *1.* Change a already existing password of a user if I kow the username
>> of the user (username or ID)
>>
>
> db(db.auth_user.id == 2).update(password =
> db.auth_user.password.validate("password")[0] )
>
> *2.* Create a new user if it's possible (with a username and a password
>> of course)
>>
>
> db.auth_user.insert(first_name = 'first', last_name = 'last',
> email = '[email protected] <javascript:>', username = 'first_last',
> password = db.auth_user.password.validate("password")[0] )
>
> *3.* List all the users in the storage db by username
>>
>
> db(db.auth_user.id > 0).select()
> or
> db().select(db.auth_user.ALL)
>
> *4*. Delete user (with username) if it's possible (if it's exist)
>>
>
> db(db.auth_user. username == 'first_last').delete()
>
> ref:
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer
>
> best regards,
> stifan
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/34b4fa2f-5685-4f33-8953-6911a1052495%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.