28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
42$action =
GETPOST(
'action',
'aZ09');
43$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'usernote';
45if (!isset($id) || empty($id)) {
50$langs->loadLangs(array(
'companies',
'members',
'bills',
'users'));
57if ((
$object->id != $user->id) && (!$user->hasRight(
"user",
"user",
"read"))) {
62$permissionnote = $user->hasRight(
"user",
"self",
"write");
66if ($user->socid > 0) {
67 $socid = $user->socid;
69$feature2 = (($socid && $user->hasRight(
"user",
"self",
"write")) ?
'' :
'user');
72$hookmanager->initHooks(array(
'usercard',
'usernote',
'globalcard'));
74$result =
restrictedArea($user,
'user', $id,
'user&user', $feature2);
80$parameters = array(
'id'=>$socid);
81$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
86 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
94llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-user page-card_note');
101 $title = $langs->trans(
"User");
106 if ($user->hasRight(
"user",
"user",
"read") || $user->admin) {
107 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
110 $morehtmlref =
'<a href="'.DOL_URL_ROOT.
'/user/vcard.php?id='.
$object->id.
'&output=file&file='.urlencode(
dol_sanitizeFileName(
$object->getFullName($langs).
'.vcf')).
'" class="refid" rel="noopener">';
111 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
112 $morehtmlref .=
'</a>';
114 $urltovirtualcard =
'/user/virtualcard.php?id='.((int)
$object->id);
115 $morehtmlref .=
dolButtonToOpenUrlInDialogPopup(
'publicvirtualcard', $langs->transnoentitiesnoconv(
"PublicVirtualCardUrl").
' - '.
$object->getFullName($langs),
img_picto($langs->trans(
"PublicVirtualCardUrl"),
'card',
'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard,
'',
'nohover');
117 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin,
'rowid',
'ref', $morehtmlref);
119 print
'<div class="underbanner clearboth"></div>';
121 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
122 print
'<input type="hidden" name="token" value="'.newToken().
'">';
124 print
'<div class="fichecenter">';
125 print
'<table class="border centpercent tableforfield">';
128 print
'<tr><td class="titlefield">'.$langs->trans(
"Login").
'</td>';
130 print
'<td class="error">';
131 print $langs->trans(
"LoginAccountDisableInDolibarr");
136 if (property_exists($object,
'admin')) {
137 if (isModEnabled(
'multicompany') && !empty(
$object->admin) && empty(
$object->entity)) {
138 $addadmin .=
img_picto($langs->trans(
"SuperAdministratorDesc"),
"redstar",
'class="paddingleft"');
139 } elseif (!empty(
$object->admin)) {
140 $addadmin .=
img_picto($langs->trans(
"AdministratorDesc"),
"star",
'class="paddingleft"');
156 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
160 $langs->load(
"errors");
161 print $langs->trans(
"ErrorRecordNotFound");
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage Dolibarr users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled='', $morecss='classlink button bordertransp', $jsonopen='', $backtopagejsfields='', $accesskey='')
Return HTML code to output a button to open a dialog popup box.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
user_prepare_head(User $object)
Prepare array with list of tabs.