Reviewed: https://reviews.mahara.org/2982 Committed: http://gitorious.org/mahara/mahara/commit/4d7f2bcb071dd7fa997fb9cb9ddfbf33cac43552 Submitter: Robert Lyon ([email protected]) Branch: master
commit 4d7f2bcb071dd7fa997fb9cb9ddfbf33cac43552 Author: Valerii Kuznetsov <[email protected]> Date: Tue Feb 4 15:52:59 2014 +1300 Different error message for an expired registration key (Bug #1246547) Expiry check moved from DB clause to PHP code with different message display. Change-Id: I9e949ccc08066b659c17f4b9c901d2c98a54ee2d Signed-off-by: Valerii Kuznetsov <[email protected]> -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1246547 Title: Give a different error message for an expired registration key than for an invalid registration key Status in Mahara ePortfolio: Fix Committed Bug description: In the optional self-registration process, users can fill in their email address to register an account, and then Mahara sends them an email with a registration link in it that contains a unique key. They click on that in order to complete the registration process. The problem is that the code for this checks on two conditions at once, and prints out only one error message for both of them. if (!$registration = get_record_select('usr_registration', '"key" = ? AND expiry >= ? AND pending != 1', array($key, db_format_timestamp(time())))) { die_info(get_string('registrationnosuchkey', 'auth.internal')); } ... and ... $string['registrationnosuchkey'] = 'Sorry, there does not seem to be a registration with this key. Perhaps you waited longer than 24 hours to complete your registration? Otherwise, it might be our fault.'; In https://mahara.org/interaction/forum/topic.php?id=5860&offset=0&limit=10#post25010 there seems to be a case where the registration key is bad, but the error message confuses matters by making it seem as if it's a time- related issue. It would be a simple and useful step to change this into two checks instead. 1. Attempt to retrieve the usr_registration record with the matching key. 2. If no record is found, print an error message saying we don't have a key that matches your link, perhaps your email program mangled it? 3. If a usr_registration record is found, compare the value of its "expiry" field with current server time, and if it has expired show the user the message that says "sorry, this key has expired." To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1246547/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

