mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-24 17:22:55 +02:00
- display age in user profile and make it available on viewtopic
- various tiny bugfixes including [Bug #2351] [Bug #2549] [Bug #2681] [Bug #3015] - strip first, then change newlines [Bug #2403] - added support for creating user profiles to the login function (makes use of user_add), triggered by LOGIN_SUCCESS_CREATE_PROFILE constant - moved newest user updating from ucp_register to user_add function - renamed the admin_ auth module function to acp_ - added initialisation code to auth_apache which checks whether it will work - added user_add support to both auth_ldap and auth_apache - some auth_ldap tweaks, should work with users deeper in the organisation structure too now - adjusted global topics in mcp_report to work like mcp_queue git-svn-id: file:///svn/phpbb/trunk@6151 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1276,8 +1276,23 @@ function show_profile($data)
|
||||
$online = false;
|
||||
}
|
||||
|
||||
$age = '';
|
||||
|
||||
if ($data['user_birthday'])
|
||||
{
|
||||
list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $data['user_birthday']));
|
||||
|
||||
if ($bday_year)
|
||||
{
|
||||
$time = time() + $user->timezone + $user->dst;
|
||||
|
||||
$age = (int) (date('Y', $time) - $bday_year - ((((date('n', $time) - $bday_month) < 0) || ((date('j', $time) - $bday_day) < 0)) ? 1 : 0));
|
||||
}
|
||||
}
|
||||
|
||||
// Dump it out to the template
|
||||
return array(
|
||||
'AGE' => $age,
|
||||
'USERNAME' => $username,
|
||||
'USER_COLOR' => (!empty($data['user_colour'])) ? $data['user_colour'] : '',
|
||||
'RANK_TITLE' => $rank_title,
|
||||
|
Reference in New Issue
Block a user