diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-31 19:17:28 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-31 19:17:28 -0500 |
commit | d9951a6e03686e41479b83bc022eb97945efeca9 (patch) | |
tree | 4641261de1e623650e8f4b784708c197240a70b3 /mediagoblin/db/models.py | |
parent | b1ae76aea0141354b479e1c0451bc003e9b6e248 (diff) | |
parent | b93a6a229e1c7a7eef76e8322104912378f79a96 (diff) | |
download | mediagoblin-d9951a6e03686e41479b83bc022eb97945efeca9.tar.lz mediagoblin-d9951a6e03686e41479b83bc022eb97945efeca9.tar.xz mediagoblin-d9951a6e03686e41479b83bc022eb97945efeca9.zip |
Merge remote branch 'remotes/aleks/aleks'
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r-- | mediagoblin/db/models.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 3da97a49..0b85430a 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -64,6 +64,14 @@ class User(Document): return auth_lib.bcrypt_check_password( password, self['pw_hash']) + def generate_new_verification_key(self): + """ + Create a new verification key, overwriting the old one. + """ + + self['verification_key'] = unicode(uuid.uuid4()) + self.save(validate=False) + class MediaEntry(Document): __collection__ = 'media_entries' |