예제 #1
0
파일: views.py 프로젝트: namongk/ecogwiki
def get_cur_user():
    user = users.get_current_user()
    # try oauth
    if user is None:
        try:
            oauth_user = oauth.get_current_user()
            is_local_dummy_user = oauth_user.user_id() == '0' and oauth_user.email() == '*****@*****.**'
            if not is_local_dummy_user:
                user = oauth_user
        except oauth.OAuthRequestError as e:
            pass

    if user is not None:
        cache.add_recent_email(user.email())
    return user
예제 #2
0
파일: views.py 프로젝트: namongk/ecogwiki
def get_cur_user():
    user = users.get_current_user()
    # try oauth
    if user is None:
        try:
            oauth_user = oauth.get_current_user()
            is_local_dummy_user = oauth_user.user_id(
            ) == '0' and oauth_user.email() == '*****@*****.**'
            if not is_local_dummy_user:
                user = oauth_user
        except oauth.OAuthRequestError as e:
            pass

    if user is not None:
        cache.add_recent_email(user.email())
    return user
예제 #3
0
파일: views.py 프로젝트: uastory/ecogwiki
 def _get_cur_user():
     user = users.get_current_user()
     if user is not None:
         cache.add_recent_email(user.email())
     return user