'yahooid' => get_string('yahooid'),
'aimid' => get_string('aimid'),
'msnid' => get_string('msnid'),
+ 'firstaccess' => get_string('firstaccess'),
'lastaccess' => get_string('lastaccess'),
'mycourses' => get_string('mycourses'))));
$string['filloutallfields'] = 'Please fill out all fields in this form';
$string['filter'] = 'Filter';
$string['findmorecourses'] = 'Find more courses...';
+$string['firstaccess'] = 'First access';
$string['firstdayofweek'] = '0';
$string['firstname'] = 'First name';
$string['firsttime'] = 'Is this your first time here?';
$DB->set_field('user', 'auth', $auth, array('username'=>$username));
$user->auth = $auth;
}
+ if (empty($user->firstaccess)) { //prevent firstaccess from remaining 0 for manual account that never required confirmation
+ $DB->set_field('user','firstaccess', $user->timemodified, array('id' => $user->id));
+ $user->firstaccess = $user->timemodified;
+ }
update_internal_user_password($user, $password); // just in case salt or encoding were changed (magic quotes too one day)
print_row(get_string('courses').':', rtrim($courselisting,', '));
}
}
-
+ if (!isset($hiddenfields['firstaccess'])) {
+ if ($user->firstaccess) {
+ $datestring = userdate($user->firstaccess)." (".format_time(time() - $user->firstaccess).")";
+ } else {
+ $datestring = get_string("never");
+ }
+ print_row(get_string("firstaccess").":", $datestring);
+ }
if (!isset($hiddenfields['lastaccess'])) {
if ($user->lastaccess) {
$datestring = userdate($user->lastaccess)." (".format_time(time() - $user->lastaccess).")";