projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf88be2
)
Adds a safeguard in User::getLogin to prevent a null/empty login from returning a...
author
Vincent Zanotti
<vincent.zanotti@m4x.org>
Sat, 11 Apr 2009 01:17:34 +0000
(
03:17
+0200)
committer
Vincent Zanotti
<vincent.zanotti@m4x.org>
Sat, 11 Apr 2009 01:17:34 +0000
(
03:17
+0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
classes/user.php
patch
|
blob
|
blame
|
history
diff --git
a/classes/user.php
b/classes/user.php
index
8b9e141
..
f633e4e
100644
(file)
--- a/
classes/user.php
+++ b/
classes/user.php
@@
-26,6
+26,10
@@
class User extends PlUser
{
global $globals;
+ if (!$login) {
+ throw new UserNotFoundException();
+ }
+
// If $data is an integer, fetches directly the result.
if (is_numeric($login)) {
$res = XDB::query("SELECT user_id FROM auth_user_md5 WHERE user_id = {?}", $login);