HOR-4155
Change method to obtain user information, because guest user is hidden.
This commit is contained in:
@@ -5,19 +5,28 @@
|
||||
/**
|
||||
* This page is redirected from the login page.
|
||||
*/
|
||||
G::LoadClass('pmFunctions');
|
||||
$userUid = $_SESSION['USER_LOGGED'];
|
||||
$userInfo = PMFInformationUser($userUid);
|
||||
$result = [
|
||||
'user_logged' => $userUid,
|
||||
'userName' => $userInfo['username'],
|
||||
'firstName' => $userInfo['firstname'],
|
||||
'lastName' => $userInfo['lastname'],
|
||||
'mail' => $userInfo['mail'],
|
||||
'image' => '../users/users_ViewPhoto?t='.microtime(true),
|
||||
];
|
||||
$userInfo = UsersPeer::retrieveByPK($userUid);
|
||||
if (empty($userInfo)) {
|
||||
$result = [
|
||||
'user_logged' => $userUid,
|
||||
'userName' => '',
|
||||
'firstName' => '',
|
||||
'lastName' => '',
|
||||
'mail' => '',
|
||||
'image' => '../users/users_ViewPhoto?t=' . microtime(true),
|
||||
];
|
||||
} else {
|
||||
$result = [
|
||||
'user_logged' => $userUid,
|
||||
'userName' => $userInfo->getUsrUsername(),
|
||||
'firstName' => $userInfo->getUsrFirstName(),
|
||||
'lastName' => $userInfo->getUsrLastName(),
|
||||
'mail' => $userInfo->getUsrEmail(),
|
||||
'image' => '../users/users_ViewPhoto?t=' . microtime(true),
|
||||
];
|
||||
?>
|
||||
parent.fullfill(<?= G::json_encode($result) ?>);
|
||||
parent.fullfill(<?= G::json_encode($result) ?>);
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
||||
Reference in New Issue
Block a user