diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2010-11-13 02:50:32 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2010-11-13 02:50:32 +0100 |
commit | 5d0f85b899e5702cc05832473f415565f325f742 (patch) | |
tree | b5dde2b1a14515b90f15910ada469ec97cc5d058 /rhodecode/model/user.py | |
parent | 208aef5f688c55ee43ec79c1c8b1f8d4a4a59b57 (diff) |
fixed anonymous access bug.
--HG--
branch : beta
Diffstat (limited to 'rhodecode/model/user.py')
-rw-r--r-- | rhodecode/model/user.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rhodecode/model/user.py b/rhodecode/model/user.py index fc6d57c2..2980aad8 100644 --- a/rhodecode/model/user.py +++ b/rhodecode/model/user.py @@ -151,6 +151,11 @@ class UserModel(object): present in database :param user: """ + + if not hasattr(user, 'user_id') or user.user_id is None: + raise Exception('passed in user has to have the user_id attribute') + + log.debug('filling auth user data') try: dbuser = self.get(user.user_id) |