Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
00578f52
Commit
00578f52
authored
Jan 25, 2005
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify getUserById as discussed on zope-dev.
parent
9f472ef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+4
-5
No files found.
lib/python/AccessControl/User.py
View file @
00578f52
...
...
@@ -488,16 +488,15 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
"""Return the named user object or None"""
raise
NotImplementedError
def
getUserById
(
self
,
id
,
default
=
_marker
):
def
getUserById
(
self
,
id
,
default
=
None
):
"""Return the user corresponding to the given id.
"""
# The connection between getting by ID and by name is not a strong
# one
try
:
return
self
.
getUser
(
id
)
except
:
if
default
is
_marker
:
raise
user
=
self
.
getUser
(
id
)
if
user
is
None
:
return
default
return
user
def
_doAddUser
(
self
,
name
,
password
,
roles
,
domains
,
**
kw
):
"""Create a new user. This should be implemented by subclasses to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment