mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-24 21:07:17 +00:00
Remove sending email after registration, and clean code
This commit is contained in:
@@ -209,10 +209,14 @@ class RegistrationBackend(object):
|
||||
else:
|
||||
site = RequestSite(request)
|
||||
|
||||
new_user = RegistrationProfile.objects.create_inactive_user(username, email,
|
||||
password, site,
|
||||
send_email=settings.REGISTRATION_SEND_MAIL)
|
||||
|
||||
new_user = RegistrationProfile.objects.create_active_user(username, email,
|
||||
password, site,
|
||||
send_email=settings.REGISTRATION_SEND_MAIL)
|
||||
|
||||
# login the user
|
||||
new_user.backend='auth.backends.ModelBackend'
|
||||
login(request, new_user)
|
||||
|
||||
userid = kwargs['userid']
|
||||
if userid:
|
||||
ccnet_rpc.add_binding(new_user.username, userid)
|
||||
|
@@ -7,7 +7,6 @@ from registration.views import register
|
||||
|
||||
from seahub.base.accounts import RegistrationForm
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^activate/complete/$',
|
||||
direct_to_template,
|
||||
@@ -24,7 +23,9 @@ urlpatterns = patterns('',
|
||||
url(r'^register/$',
|
||||
register,
|
||||
{ 'backend': 'seahub.base.accounts.RegistrationBackend',
|
||||
'form_class': RegistrationForm },
|
||||
'form_class': RegistrationForm,
|
||||
'success_url': '/',
|
||||
},
|
||||
name='registration_register'),
|
||||
url(r'^register/complete/$',
|
||||
direct_to_template,
|
||||
|
Reference in New Issue
Block a user