1<?php 2/* 3Copyright (C) 2014, Siemens AG 4 5This program is free software; you can redistribute it and/or 6modify it under the terms of the GNU General Public License 7version 2 as published by the Free Software Foundation. 8 9This program is distributed in the hope that it will be useful, 10but WITHOUT ANY WARRANTY; without even the implied warranty of 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12GNU General Public License for more details. 13 14You should have received a copy of the GNU General Public License along 15with this program; if not, write to the Free Software Foundation, Inc., 1651 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17*/ 18 19namespace Fossology\Lib\Application; 20 21/** 22 * @file 23 * @brief Get user info from session 24 */ 25 26/** 27 * @class UserInfo 28 * @brief Get user info from session 29 */ 30class UserInfo 31{ 32 33 /** 34 * @brief Get the user id from the session. 35 * @return int Id of the current user 36 */ 37 public function getUserId() 38 { 39 return $_SESSION['UserId']; 40 } 41 42 /** 43 * @brief Get the group id from the session. 44 * @return int Id of the current group 45 */ 46 public function getGroupId() 47 { 48 return $_SESSION['GroupId']; 49 } 50} 51