Add information about user who created the user on screen and when - refs BT#7123

1.9.x
Yannick Warnier 11 years ago
parent ba31509bd6
commit 84c261c579
  1. 5
      main/admin/user_information.php
  2. 3
      main/inc/lib/main_api.lib.php

@ -92,6 +92,11 @@ echo '<a href="javascript: void(0);" onclick="'.$onclick.'" >'
echo '<p>'.($user['status'] == 1 ? get_lang('Teacher') : get_lang('Student'))
.'</p>';
echo '<p>'.Display :: encrypted_mailto_link($user['mail'], $user['mail']).'</p>';
// Show info about who created this user and when
$creatorId = $user['creator_id'];
$creatorInfo = api_get_user_info($creatorId);
$registrationDate = $user['registration_date'];
echo '<p>'.sprintf(get_lang('CreatedByXYOnZ'), 'user_information.php?user_id='.$creatorId, $creatorInfo['username'], api_get_utc_datetime($registrationDate)).'</p>';
/**
* Show the sessions and the courses in which this user is subscribed

@ -1156,6 +1156,9 @@ function _api_format_user($user, $add_password = false) {
$result['password'] = $user['password'];
}
$result['creator_id'] = $user['creator_id'];
$result['registration_date'] = $user['registration_date'];
return $result;
}

Loading…
Cancel
Save