aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mediagoblin/auth/views.py1
-rw-r--r--mediagoblin/db/mongo/models.py2
2 files changed, 1 insertions, 2 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py
index 919aa3cd..66178371 100644
--- a/mediagoblin/auth/views.py
+++ b/mediagoblin/auth/views.py
@@ -84,6 +84,7 @@ def register(request):
user.email = email
user.pw_hash = auth_lib.bcrypt_gen_password_hash(
request.POST['password'])
+ user.verification_key = unicode(uuid.uuid4())
user.save(validate=True)
# log the user in
diff --git a/mediagoblin/db/mongo/models.py b/mediagoblin/db/mongo/models.py
index 0e31fc1c..b068fb06 100644
--- a/mediagoblin/db/mongo/models.py
+++ b/mediagoblin/db/mongo/models.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
-import uuid
from mongokit import Document
@@ -88,7 +87,6 @@ class User(Document):
'created': datetime.datetime.utcnow,
'email_verified': False,
'status': u'needs_email_verification',
- 'verification_key': lambda: unicode(uuid.uuid4()),
'is_admin': False}
def check_login(self, password):