Commit 22606df6 authored by chealer's avatar chealer

[FIX] User preferences and information: fix test that the user exists....

[FIX] User preferences and information: fix test that the user exists. get_user_login() now returns false instead of NULL (from r32118)
parent 1d246737
......@@ -12,7 +12,7 @@ include_once ('lib/registration/registrationlib.php');
include_once ('lib/trackers/trackerlib.php');
if (isset($_REQUEST['userId'])) {
$userwatch = $tikilib->get_user_login($_REQUEST['userId']);
if ($userwatch === NULL) {
if ($userwatch === false) {
$smarty->assign('errortype', 'no_redirect_login');
$smarty->assign('msg', tra("Unknown user"));
$smarty->display("error.tpl");
......
......@@ -31,7 +31,7 @@ if (isset($_REQUEST['userId']) || isset($_REQUEST['view_user'])) {
if (empty($_REQUEST['view_user'])) $userwatch = $tikilib->get_user_login($_REQUEST['userId']);
else $userwatch = $_REQUEST['view_user'];
if ($userwatch != $user) {
if ($userwatch === NULL) {
if ($userwatch === false) {
$smarty->assign('msg', tra("Unknown user"));
$smarty->display("error.tpl");
die;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment