1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-21 19:00:12 +00:00

Refactor auth and rename CcnetUser to User

This commit is contained in:
xiez
2012-08-07 16:48:26 +08:00
parent 8349e5f9c7
commit 85fb879c74
17 changed files with 188 additions and 186 deletions

View File

@@ -12,6 +12,7 @@ from pysearpc import SearpcError
from forms import ProfileForm
from models import Profile
from utils import render_error
from seahub.base.accounts import User
from seahub.contacts.models import Contact
#@login_required
@@ -74,10 +75,10 @@ def user_profile(request, user):
user_nickname = ''
user_intro = ''
err_msg = ''
try:
user_check = ccnet_threaded_rpc.get_emailuser(user)
except:
user_check = User.objects.get(email=user)
except User.DoesNotExist:
user_check = None
if user_check:
@@ -114,10 +115,10 @@ def get_user_profile(request, user):
'new_user': ''
}
content_type = 'application/json; charset=utf-8'
try:
user_check = ccnet_threaded_rpc.get_emailuser(user)
except:
user_check = User.objects.get(email=user)
except User.DoesNotExist:
user_check = None
if user_check: