Merge pull request #68 from ThomasRubini/fix
This commit is contained in:
commit
3627fc92ab
@ -197,19 +197,14 @@ final class UserController
|
|||||||
$O_userModel = new UserModel();
|
$O_userModel = new UserModel();
|
||||||
$A_user = $O_userModel->getUserByID($A_urlParams[0]);
|
$A_user = $O_userModel->getUserByID($A_urlParams[0]);
|
||||||
|
|
||||||
if (!isset($A_user)) {
|
if (isset($A_user) && $A_user["PROFILE_PIC"] !== null) {
|
||||||
throw new HTTPSpecialCaseException(404);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($A_user["PROFILE_PIC"] === null) {
|
|
||||||
header("Content-Type: image/svg+xml");
|
|
||||||
echo file_get_contents(Constants::rootDir()."/static/img/default_user.svg");
|
|
||||||
} else {
|
|
||||||
header("Content-Type: image");
|
header("Content-Type: image");
|
||||||
echo $A_user["PROFILE_PIC"];
|
echo $A_user["PROFILE_PIC"];
|
||||||
|
} else {
|
||||||
|
header("Content-Type: image/svg+xml");
|
||||||
|
echo file_get_contents(Constants::rootDir()."/static/img/default_user.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return Utils::RETURN_RAW;
|
return Utils::RETURN_RAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user