mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-65959 badges: Do not use badge user preference after verification
This commit is contained in:
parent
3cae9421a8
commit
96ec45cb17
3 changed files with 10 additions and 10 deletions
|
@ -49,7 +49,7 @@ if (!empty($issuedbadge->recipient->id)) {
|
|||
$badge = new badge($badgeid);
|
||||
$backpack = $DB->get_record('badge_backpack', array('userid' => $USER->id));
|
||||
$sitebackpack = badges_get_site_primary_backpack();
|
||||
$userbackpack = badges_get_site_backpack($backpack->externalbackpackid);
|
||||
$userbackpack = badges_get_site_backpack($backpack->externalbackpackid, $USER->id);
|
||||
$assertion = new core_badges_assertion($id, $sitebackpack->apiversion);
|
||||
$api = new \core_badges\backpack_api($sitebackpack);
|
||||
$api->authenticate();
|
||||
|
|
|
@ -67,6 +67,8 @@ if (!is_null($storedsecret)) {
|
|||
// Remove the verification vars and redirect to the mypackpack page.
|
||||
unset_user_preference('badges_email_verify_secret');
|
||||
unset_user_preference('badges_email_verify_address');
|
||||
unset_user_preference('badges_email_verify_backpackid');
|
||||
unset_user_preference('badges_email_verify_password');
|
||||
redirect(new moodle_url($redirect), get_string('backpackemailverifysuccess', 'badges'),
|
||||
null, \core\output\notification::NOTIFY_SUCCESS);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue