Index: moodle/admin/uploaduser.php
--- moodle/admin/uploaduser.php Base (1.105)
+++ moodle/admin/uploaduser.php Locally Modified (Based On 1.105)
@@ -205,6 +205,7 @@
         foreach ($line as $key => $value) {
             if ($value !== '') {
                 $key = $columns[$key];
+                $user->timecreated = time();
                 // password is special field
                 if ($key == 'password') {
                     if ($value !== '') {

Index: moodle/lib/db/install.xml
--- moodle/lib/db/install.xml Base (1.225)
+++ moodle/lib/db/install.xml Locally Modified (Based On 1.225)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="lib/db" VERSION="20100106" COMMENT="XMLDB file for core Moodle tables"
+<XMLDB PATH="lib/db" VERSION="20100107" COMMENT="XMLDB file for core Moodle tables"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
 >
@@ -600,8 +600,9 @@
         <FIELD NAME="htmleditor" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" PREVIOUS="maildisplay" NEXT="ajax"/>
         <FIELD NAME="ajax" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" PREVIOUS="htmleditor" NEXT="autosubscribe"/>
         <FIELD NAME="autosubscribe" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" PREVIOUS="ajax" NEXT="trackforums"/>
-        <FIELD NAME="trackforums" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="autosubscribe" NEXT="timemodified"/>
-        <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="trackforums" NEXT="trustbitmask"/>
+        <FIELD NAME="trackforums" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="autosubscribe" NEXT="timecreated"/>
+        <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="trackforums" NEXT="timemodified"/>
+        <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="timecreated" NEXT="trustbitmask"/>
         <FIELD NAME="trustbitmask" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="timemodified" NEXT="imagealt"/>
         <FIELD NAME="imagealt" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="alt tag for user uploaded image" PREVIOUS="trustbitmask" NEXT="screenreader"/>
         <FIELD NAME="screenreader" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" COMMENT="flag for determining whehter the user uses a screenreader." PREVIOUS="imagealt"/>
Index: moodle/lib/db/upgrade.php
--- moodle/lib/db/upgrade.php Base (1.355)
+++ moodle/lib/db/upgrade.php Locally Modified (Based On 1.355)
@@ -2857,6 +2857,24 @@
         upgrade_main_savepoint($result, 2010010601);
     }
 
+    if ($result && $oldversion < 2010010602) {
+
+    /// Define field timecreated to be added to user
+        $table = new xmldb_table('user');
+        $field = new xmldb_field('timecreated', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'trackforums');
+        
+        if (!$dbman->field_exists($table, $field)) {            
+        /// Launch add field timecreated
+            $dbman->add_field($table, $field);
+            
+            $DB->execute("UPDATE {user} SET timecreated = firstaccess");
+            
+            $sql = "UPDATE {user} SET timecreated = " . time() ." where timecreated = 0";
+            $DB->execute($sql);
+        }
+        upgrade_main_savepoint($result, 2010010602);
+    }
+
     return $result;
 }
 
Index: moodle/login/signup.php
--- moodle/login/signup.php Base (1.69)
+++ moodle/login/signup.php Locally Modified (Based On 1.69)
@@ -58,6 +58,7 @@
     $user->confirmed   = 0;
     $user->lang        = current_language();
     $user->firstaccess = time();
+    $user->timecreated = time();
     $user->mnethostid  = $CFG->mnet_localhost_id;
     $user->secret      = random_string(15);
     $user->auth        = $CFG->registerauth;

Index: moodle/user/editadvanced.php
--- moodle/user/editadvanced.php Base (1.64)
+++ moodle/user/editadvanced.php Locally Modified (Based On 1.64)
@@ -145,6 +145,7 @@
         $usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, null, 'user_profile', null);
         $usernew->mnethostid = $CFG->mnet_localhost_id; // always local user
         $usernew->confirmed  = 1;
+        $usernew->timecreated = time();
         $usernew->password = hash_internal_user_password($usernew->newpassword);
         $usernew->id = $DB->insert_record('user', $usernew);
         $usercreated = true;

Index: moodle/version.php
--- moodle/version.php Base (1.1388)
+++ moodle/version.php Locally Modified (Based On 1.1388)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-    $version = 2010010601;  // YYYYMMDD   = date of the last version bump
+    $version = 2010010602;  // YYYYMMDD   = date of the last version bump
                             //         XX = daily increments
 
     $release = '2.0 dev (Build: 20100107)';  // Human-friendly version name
