Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
2b8b254c
Commit
2b8b254c
authored
Jan 21, 2009
by
Nigel McNie
Browse files
(#3098) Speculative fix - allow user ID 0 to be retrieved by
User->find_by_id.
parent
36ca25fd
Changes
2
Show whitespace changes
Inline
Side-by-side
htdocs/auth/user.php
View file @
2b8b254c
...
...
@@ -117,7 +117,7 @@ class User {
WHERE
id = ?'
;
$user
=
get_record_sql
(
$sql
,
$id
);
$user
=
get_record_sql
(
$sql
,
array
(
$id
)
)
;
if
(
false
==
$user
)
{
throw
new
AuthUnknownUserException
(
"User with id
\"
$id
\"
is not known"
);
...
...
htdocs/lib/user.php
View file @
2b8b254c
...
...
@@ -917,7 +917,7 @@ function can_send_message($from, $to) {
}
function
load_user_institutions
(
$userid
)
{
if
(
empty
(
$userid
)
)
{
if
(
!
is_numeric
(
$userid
)
||
$userid
<
0
)
{
throw
new
InvalidArgumentException
(
"couldn't load institutions, no user id specified"
);
}
if
(
$institutions
=
get_records_sql_assoc
(
'
...
...
Write
Preview
Supports
Markdown
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