Revision 1808f7bc snf-astakos-app/astakos/im/views/im.py
b/snf-astakos-app/astakos/im/views/im.py | ||
---|---|---|
1 |
# Copyright 2011-2012 GRNET S.A. All rights reserved.
|
|
1 |
# Copyright 2011, 2012, 2013 GRNET S.A. All rights reserved.
|
|
2 | 2 |
# |
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
... | ... | |
464 | 464 |
**form_kwargs) |
465 | 465 |
|
466 | 466 |
if form.is_valid(): |
467 |
user = form.save(commit=False) |
|
468 |
|
|
469 |
# delete previously unverified accounts |
|
470 |
if AstakosUser.objects.user_exists(user.email): |
|
471 |
AstakosUser.objects.get_by_identifier(user.email).delete() |
|
472 |
|
|
473 |
# store_user so that user auth providers get initialized |
|
474 |
form.store_user(user, request) |
|
467 |
user = form.create_user() |
|
475 | 468 |
result = activation_backend.handle_registration(user) |
476 | 469 |
if result.status == \ |
477 | 470 |
activation_backend.Result.PENDING_MODERATION: |
Also available in: Unified diff