Skip to content

Instantly share code, notes, and snippets.

@ale-rt
Created August 18, 2020 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ale-rt/f9ec66d77849d8135056ab1a268f9575 to your computer and use it in GitHub Desktop.
Save ale-rt/f9ec66d77849d8135056ab1a268f9575 to your computer and use it in GitHub Desktop.
How to update membrane users

Change some properties

>>> profiles = app.quaive.profiles
>>> profiles["foo"].email = "foo.bar@example.com"
>>> from transaction import commit
>>> commit()

Set an encrypted password

>>> from AccessControl import AuthEncoding
>>> profiles = app.quaive.profiles
>>> profiles["foo"].password = AuthEncoding.pw_encrypt(b"bar", encoding="BCRYPT")
>>> from transaction import commit
>>> commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment