Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69462

Redirect users to original 'wantsurl' after update of custom profile fields.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.5.13, 3.7.7, 3.8.4, 3.9.1
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      Description

      When an unregistered user clicks on a course link from any external source, the user is taken to the login page.

      After creation of profile using Google or Facebook login, the user is correctly taken to the original URL. i.e. 'wantsurl'.

      However, if any additional custom profile fields have to be filled in by the user, the user is taken to the user profile edit page. After the user submits the additional fields, the info is updated and the screen returns to the user preferences page.

      In the above scenario, the user will have to go to the dashboard or search through the menus again to go to the original course (the original link).

      Instead, the user should be automatically directed to the original link/url - 'wantsurl'.

       

      In /user/edit.php, on line 187, change $returnurl = new moodle_url('/user/preferences.php', array('userid' => $user->id)); to $returnurl = $SESSION->wantsurl;.
      

      Credit for the work around goes to @Yew Zhi Yong

       

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sangee Sanjay G
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: