equal
deleted
inserted
replaced
362 >>> from cubicweb import Binary |
362 >>> from cubicweb import Binary |
363 >>> from cubicweb.server.utils import crypt_password |
363 >>> from cubicweb.server.utils import crypt_password |
364 >>> crypted = crypt_password('joepass') |
364 >>> crypted = crypt_password('joepass') |
365 >>> rset = rql('Any U WHERE U is CWUser, U login "joe"') |
365 >>> rset = rql('Any U WHERE U is CWUser, U login "joe"') |
366 >>> joe = rset.get_entity(0,0) |
366 >>> joe = rset.get_entity(0,0) |
367 >>> joe.set_attributes(upassword=Binary(crypted)) |
367 >>> joe.cw_set(upassword=Binary(crypted)) |
368 |
368 |
369 Please, refer to the script example is provided in the `misc/examples/chpasswd.py` file. |
369 Please, refer to the script example is provided in the `misc/examples/chpasswd.py` file. |
370 |
370 |
371 The more experimented people would use RQL request directly:: |
371 The more experimented people would use RQL request directly:: |
372 |
372 |