View Issue Details

IDProjectCategoryView StatusLast Update
0020229mantisbtbugtrackerpublic2017-07-25 18:08
Reportercproensa Assigned To 
PrioritylowSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Summary0020229: user last name to be stored in user table field
Description

Currently there exist an option to sort user name by their last name ('sort_by_last_name').
The user last name is calculated at runtime with a separation at first space character:
explode( ' ', utf8_strtolower( $t_user_name ), 2 );

This presents some problems:
1) Code is not reused. At least a common helper function should be used
2) The logic to extract the last name does not account for real life situations, which can be common outside the English context

Some real life issues:

  • Compound names. In my language (spanish) there are names with a compound first name
    For example: "Miguel Angel Perez" should be decomposed in:
    first name: "Miguel Angel"
    last name: "Perez"
  • Localization contexts. I think that some countries/languages use a different position for main last name. For example, if i am not mistaken, portuguese names like: "Joao Teixeira Almeida" should be presented:
    first name: "Joao"
    last name: "Almeida"

For these reasons, if an option to sort or show user by last name is provided, the proper way to handle is to let the user set the last/first name by himself.
In such case, new fields must be created in user table, and added inputs on user forms.

Tagsschema

Activities

dregad

dregad

2015-10-28 10:54

developer   ~0051743

Makes sense. Due to the required schema change, this can't be considered before next release.