* Copyright (C) 2005-2015 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/user/info.php * \ingroup core * \brief Page des informations d'un utilisateur */ // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; // Load translation files required by page $langs->load("users"); // Security check $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); $object->getrights(); } // Security check $socid = 0; if ($user->socid > 0) { $socid = $user->socid; } $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { accessforbidden(); } /* * View */ $form = new Form($db); $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; $title = $person_name." - ".$langs->trans('Info'); $help_url = ''; llxHeader('', $title, $help_url); $head = user_prepare_head($object); $title = $langs->trans("User"); print dol_get_fiche_head($head, 'info', $title, -1, 'user'); $linkback = ''; if ($user->rights->user->user->lire || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } $morehtmlref = ''; $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); $object->info($id); // This overwrite ->ref with login instead of id print '
'; print '
'; print '
'; dol_print_object_info($object); print '
'; print dol_get_fiche_end(); // End of page llxFooter(); $db->close();