3 * Userhome Personal Information Widget Class
5 * Copyright 2018, Franck Villaume - TrivialDev
6 * http://fusionforge.org
8 * This file is a part of Fusionforge.
10 * Fusionforge is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * Fusionforge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Fusionforge. If not, see <http://www.gnu.org/licenses/>.
24 require_once 'Widget.class.php';
25 require_once $gfcommon.'include/user_profile.php';
27 class Widget_UserhomePersonalInformation extends Widget {
29 function __construct($owner_id) {
30 $this->owner_id = $owner_id;
31 parent::__construct('uhpersonalinformation', $owner_id, WidgetLayoutManager::OWNER_TYPE_USERHOME);
32 $this->title = _('Personal Information');
39 function isAvailable() {
40 return isset($this->title);
43 function getContent() {
44 $user = user_get_object($this->owner_id);
45 echo user_personal_information($user);