I simply offered
it is less than code and it is more convenient for perception
and the dumping of data base can be inserted into a separate key
Global style:
...
global $user, ..., ...;
$user = $user_info;
$user['db_fields'] = $user_settings;
...
Function style:
...
$full_user_data = user();
$user_id = user('id');
$user_name = user('name');
...
Ultimate style:
if you don't like short names, it is possible to make the name of function more detailed:
...
getSmfElkarteCurrentMyUserData ('', false)
...
joke
trick