X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=blobdiff_plain;f=portal%2Factions.py;fp=portal%2Factions.py;h=f0bea38fe03c2204f7cffad61597cf53c6556cf4;hp=e0dc131f8f01511391bb9b84d186e3a1484ac72f;hb=8a8188314dfa86c57180b88c1c76ce89ef7c0ed2;hpb=ac4d50c6fff1af8a06fdccbad916cd8d4d2200d1 diff --git a/portal/actions.py b/portal/actions.py index e0dc131f..f0bea38f 100644 --- a/portal/actions.py +++ b/portal/actions.py @@ -4,6 +4,7 @@ from manifoldapi.manifoldapi import execute_query,execute_admin_query from portal.models import PendingUser, PendingSlice, PendingAuthority, PendingProject, PendingJoin from unfold.page import Page +import hashlib import json from django.contrib.auth.models import User @@ -1285,7 +1286,8 @@ def create_pending_user(wsgi_request, request, user_detail): msg.send() # saves the user to django auth_user table [needed for password reset] - user = User.objects.create_user(request['email'].split('@')[-1], request['email'], request['password']) + # Django username must be less than 30 char so we use a hash + user = User.objects.create_user(hashlib.sha1(request['email']).hexdigest(), request['email'], request['password']) # Creating a manifold user user_id = manifold_add_user(wsgi_request, request)