consistency improvement firstname instead of firstName (although this one is kept also for historical reasons). It is advised to use firstname and lastname (lowercase) from now on so that the field matches the database field and camelcase is used for language files.

This caused a minor bug when adding an announcement to selected users: the names did not display after the performance fix of commit #9232
skala
Patrick Cool 16 years ago
parent 35838ca640
commit f61774e2b9
  1. 6
      main/inc/lib/main_api.lib.php

@ -796,8 +796,10 @@ function api_get_user_info($user_id = '') {
// ideally the names of the fields of the user table are renamed so that they match $_user (or vice versa)
// $_user should also contain every field of the user table (except password maybe). This would make the
// following lines obsolete (and the code cleaner and slimmer !!!
$user_info['firstName'] = $result_array['firstname'];
$user_info['lastName'] = $result_array['lastname'];
$user_info['firstName'] = $result_array['firstname'];
$user_info['lastName'] = $result_array['lastname'];
$user_info['firstname'] = $result_array['firstname'];
$user_info['lastname'] = $result_array['lastname'];
$user_info['mail'] = $result_array['email'];
$user_info['picture_uri'] = $result_array['picture_uri'];
$user_info['user_id'] = $result_array['user_id'];

Loading…
Cancel
Save