Moodle
  1. Moodle
  2. MDL-30717

Method create_user_record() @ "/lib/moodlelib.php" that could be used from External Database Authentication plugins, does not register mdl_user->timecreated property.

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      Enable the auth/db plugin, create some users into this external database and try to login with it. Then you will see his timecreated property will not be registered to the database.

      Repeat with timemodified after changing user info in external database.

      Show
      Enable the auth/db plugin, create some users into this external database and try to login with it. Then you will see his timecreated property will not be registered to the database. Repeat with timemodified after changing user info in external database.
    • Workaround:
      Hide

      The included patch.diff file sets the timecreated and the timemodified as the same time value, as this property is registered in the "/user/editadvanced.php".

      Show
      The included patch.diff file sets the timecreated and the timemodified as the same time value, as this property is registered in the "/user/editadvanced.php".
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w02_MDL-30717_m23_usercreated
    • Rank:
      33590

      Description

      Method create_user_record() @ "/lib/moodlelib.php" that could be used from External Database Authentication plugins, on authenticate_user_login() method (from the same file) does not register mdl_user->timecreated property. This method authenticate_user_login() is called from "/login/index.php".

      1. patch.diff
        0.5 kB
        Luis Gustavo Mueller de Alcantara

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this and the linked issue. And thanks for providing a patch.

          Show
          Michael de Raadt added a comment - Thanks for reporting this and the linked issue. And thanks for providing a patch.
          Hide
          Luis Gustavo Mueller de Alcantara added a comment -

          You are welcome. I did not know that was possible to link issues. This is pretty handy.

          Show
          Luis Gustavo Mueller de Alcantara added a comment - You are welcome. I did not know that was possible to link issues. This is pretty handy.
          Hide
          Petr Škoda added a comment -

          To integrators: please cherry pick to 2.1.x and 2.2.x

          Thanks for the report!

          Show
          Petr Škoda added a comment - To integrators: please cherry pick to 2.1.x and 2.2.x Thanks for the report!
          Hide
          Petr Škoda added a comment -

          I have added user->timemodified in update_user_record() function too to match the user creation.

          Show
          Petr Škoda added a comment - I have added user->timemodified in update_user_record() function too to match the user creation.
          Hide
          Luis Gustavo Mueller de Alcantara added a comment -

          Thanks Petr, for adding this modification to update_user_record() function too.

          Show
          Luis Gustavo Mueller de Alcantara added a comment - Thanks Petr, for adding this modification to update_user_record() function too.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The integration of this issue has been delayed to next week because the integration period is over (Monday, Tuesday) and testing must happen on Wednesday.

          This change to a more rigid timeframe on each integration/testing cycle aims to produce a better and clear separation and organization of tasks for everybody.

          This is a bulk-automated message, so if you want to blame somebody/thing/where, don't do it here (use git instead) :-D :-P

          Apologizes for the inconvenient, this will be integrated next week. Thanks for your collaboration & ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The integration of this issue has been delayed to next week because the integration period is over (Monday, Tuesday) and testing must happen on Wednesday. This change to a more rigid timeframe on each integration/testing cycle aims to produce a better and clear separation and organization of tasks for everybody. This is a bulk-automated message, so if you want to blame somebody/thing/where, don't do it here (use git instead) :-D :-P Apologizes for the inconvenient, this will be integrated next week. Thanks for your collaboration & ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Thanks guys - this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks guys - this has been integrated now
          Hide
          Adrian Greeve added a comment -

          I created a new mysql database with minimal information in it. Then enabled the auth/db plugin. I checked this out pre-patch and observed that date created wasn't filled in and that the date modified would always stay the same.
          Next I tried the same steps with the patch. Time created is now filled in and date modified works as it should.

          Thanks everyone.

          Show
          Adrian Greeve added a comment - I created a new mysql database with minimal information in it. Then enabled the auth/db plugin. I checked this out pre-patch and observed that date created wasn't filled in and that the date modified would always stay the same. Next I tried the same steps with the patch. Time created is now filled in and date modified works as it should. Thanks everyone.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This virus has been spread upstream, everybody will be infected soon. Congrats, you did it!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - This virus has been spread upstream, everybody will be infected soon. Congrats, you did it! Closing, ciao
          Hide
          Luis Gustavo Mueller de Alcantara added a comment -

          Thank you guys, for all this great work.

          Show
          Luis Gustavo Mueller de Alcantara added a comment - Thank you guys, for all this great work.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: