Firstname only on login
This commit is contained in:
parent
fd90ac517f
commit
58a734cb17
@ -389,7 +389,7 @@ abstract class CommonObject
|
|||||||
*
|
*
|
||||||
* @param Translate $langs Language object for translation of civility
|
* @param Translate $langs Language object for translation of civility
|
||||||
* @param int $option 0=No option, 1=Add civility
|
* @param int $option 0=No option, 1=Add civility
|
||||||
* @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
|
* @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname
|
||||||
* @param int $maxlen Maximum length
|
* @param int $maxlen Maximum length
|
||||||
* @return string String with full name
|
* @return string String with full name
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -4297,12 +4297,16 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1)
|
|||||||
$ret='';
|
$ret='';
|
||||||
// If order not defined, we use the setup
|
// If order not defined, we use the setup
|
||||||
if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION));
|
if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION));
|
||||||
if ($nameorder)
|
if ($nameorder && $nameorder != '2')
|
||||||
{
|
{
|
||||||
$ret.=$firstname;
|
$ret.=$firstname;
|
||||||
if ($firstname && $lastname) $ret.=' ';
|
if ($firstname && $lastname) $ret.=' ';
|
||||||
$ret.=$lastname;
|
$ret.=$lastname;
|
||||||
}
|
}
|
||||||
|
else if ($nameorder == 2)
|
||||||
|
{
|
||||||
|
$ret.=$firstname;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret.=$lastname;
|
$ret.=$lastname;
|
||||||
|
|||||||
@ -1390,8 +1390,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
</script>' . "\n";
|
</script>' . "\n";
|
||||||
|
|
||||||
// Raven.js for client-side Sentry logging support
|
// Raven.js for client-side Sentry logging support
|
||||||
if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN)) {
|
if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN))
|
||||||
|
{
|
||||||
// Filter out secret key
|
// Filter out secret key
|
||||||
$dsn = parse_url($conf->global->SYSLOG_SENTRY_DSN);
|
$dsn = parse_url($conf->global->SYSLOG_SENTRY_DSN);
|
||||||
$public_dsn = $dsn['scheme'] . '://' . $dsn['user'] .'@' . $dsn['host'] . $dsn['path'];
|
$public_dsn = $dsn['scheme'] . '://' . $dsn['user'] .'@' . $dsn['host'] . $dsn['path'];
|
||||||
@ -1465,7 +1465,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
|
|
||||||
// Login name with tooltip
|
// Login name with tooltip
|
||||||
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
|
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
|
||||||
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11);
|
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11, 0, 'firstname');
|
||||||
$toprightmenu.='</div></div>';
|
$toprightmenu.='</div></div>';
|
||||||
|
|
||||||
$toprightmenu.='</div>';
|
$toprightmenu.='</div>';
|
||||||
|
|||||||
BIN
htdocs/theme/md_exp/img/title_hrm.png
Normal file
BIN
htdocs/theme/md_exp/img/title_hrm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@ -500,6 +500,7 @@ td.showDragHandle {
|
|||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
display: table;
|
display: table;
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
#id-right, #id-left {
|
#id-right, #id-left {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
|||||||
@ -1836,9 +1836,10 @@ class User extends CommonObject
|
|||||||
* @param integer $notooltip 1=Disable tooltip
|
* @param integer $notooltip 1=Disable tooltip
|
||||||
* @param int $maxlen Max length of visible user name
|
* @param int $maxlen Max length of visible user name
|
||||||
* @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user
|
* @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user
|
||||||
|
* @param string $mode 'firstname'=Show only firstname
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0)
|
function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='')
|
||||||
{
|
{
|
||||||
global $langs, $conf, $db;
|
global $langs, $conf, $db;
|
||||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||||
@ -1905,7 +1906,7 @@ class User extends CommonObject
|
|||||||
$result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
$result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
||||||
if ($withpicto != 2) $result.=' ';
|
if ($withpicto != 2) $result.=' ';
|
||||||
}
|
}
|
||||||
$result.= $link . $this->getFullName($langs,'',-1,$maxlen) . $linkend . $companylink;
|
$result.= $link . $this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen) . $linkend . $companylink;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user