How can I Bypass Edit Profile page an initial login

How can I Bypass Edit Profile page an initial login

by Chris Werstiuk -
Number of replies: 6

We have phpbb group for all of our users and have created a moodle site that can only be accessed by manually added users and phpbb users. 

We created a new authentication plugin based on the external database plugin that applies the username, password, first name, and last name. (The fields we care about)

We disabled the requirement for city and country  on Edit Profile page profile as per a couple of posts in the moodle forums.

Moodle now has all the information it needs when a phpbb user logs in for the first time and our test users found the  Edit Profile page to be annoying and irrelevent.  The big complaint is there is no obvious way to get to the main page from the user profile edit screen.

How can we bypass the initial  Edit Profile page and go straight to the main page ?

 

Thanks in advance for your help!

Average of ratings: -
In reply to Chris Werstiuk

Re: How can I Bypass Edit Profile page an initial login

by chandrika harathi -

Same situation but  using LDAP. We will be launching Moodle Pilot very soon and here are our issues:

1. Not all our users will be in Moodle to start with. Which means:
Not all students/faculty who have a valid LDAP account will be in Moodle courses.

2. When somebody who has a valid LDAP account and not in Moodle course logs into moodle, we do not want them to see the profile page on login.

Ideally they should see the Moodle  Home page but no courses. We do not want them to create their account.

In reply to chandrika harathi

Re: How can I Bypass Edit Profile page an initial login

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Then what you need to do is to ensure all of the required profile fields in Moodle (email first name, last name description etc.) are filled in in your users LDAP accounts and the appropriate fields are mapped from LDAP to Moodle...

In reply to Jon Witts

Re: How can I Bypass Edit Profile page an initial login

by Chris Werstiuk -

This turnd out to be the solution.  Some user accounts in the origin DB were created before users were forced to enter all information and these people saw the user page.  Everyone else went straight to the main page.

In reply to Jon Witts

Re: How can I Bypass Edit Profile page an initial login

by chandrika harathi -

I did not set up LDAP mapping. All I use LDAP is for authentication. Also we not have city/country/phone/address etc in our LDAP.

In reply to Chris Werstiuk

Re: How can I Bypass Edit Profile page an initial login

by vishal kumar -

Hi friends ,

This can be done by coding. Go to login folder inside moodle directory. Open the index.php file and comments this whole "if (user_not_fully_set_up($USER)) {
            $urltogo = $CFG->wwwroot.'/user/edit.php';
            We don't delete $SESSION->wantsurl yet, so we get there later

       } else "

 

In reply to Chris Werstiuk

Re: How can I Bypass Edit Profile page an initial login

by Agustín Chávez -

I have the same problem but the users were created with API, I do not know if there is a better way to solve this problem. I add on bottom a jquery trigger to do the redirect (moodle 2.8).

_____

$lastName="Usuario VM";

if($lastName==$USER->lastname){

    "<script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'></script><script>$(function(){ $('#id_submitbutton').trigger('click'); });</script>";

}

____