getUsrUid(); $userInfo = PMFInformationUser($userUid); if (empty($userInfo)) { throw new \Exception('WebEntry User not found'); } $_SESSION['USER_LOGGED'] = $userUid; $_SESSION['USR_USERNAME'] = $userInfo['username']; $result = [ 'user_logged' => $userUid, 'userName' => $userInfo['username'], 'firstName' => $userInfo['firstname'], 'lastName' => $userInfo['lastname'], 'mail' => $userInfo['mail'], 'image' => '../users/users_ViewPhoto?t='.microtime(true), ]; } catch (\Exception $e) { $result = [ 'error' => $e->getMessage(), ]; http_response_code(500); } echo G::json_encode($result);