User: Always return the name with a capital letter

This commit is contained in:
Ilya Prokopenko 2022-05-31 14:20:02 +03:00
parent 6cc7d9c553
commit 2dd37519e3
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56

View file

@ -149,7 +149,7 @@ class User extends RowModel
{ {
$name = $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->first_name, MB_CASE_TITLE); $name = $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->first_name, MB_CASE_TITLE);
if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine) if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine)
return transliterator_transliterate($ts, $name); return mb_convert_case(transliterator_transliterate($ts, $name), MB_CASE_TITLE);
else else
return $name; return $name;
} }
@ -158,7 +158,7 @@ class User extends RowModel
{ {
$name = $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->last_name, MB_CASE_TITLE); $name = $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->last_name, MB_CASE_TITLE);
if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine) if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine)
return transliterator_transliterate($ts, $name); return mb_convert_case(transliterator_transliterate($ts, $name), MB_CASE_TITLE);
else else
return $name; return $name;
} }