User can't change password?

User can't change password?

by Aaron Munter -
Number of replies: 2
Posted this over in Authentication, but didn't get a response, so am doing so here, in hopes that it's a more appropriate spot.

I've got DB-based authentication working fine; users can log in without a problem. As an admin, I can change my password without a problem, too.

But when a student logs in, enters a course, and then, within the "Administration" block, chooses "Change password", it gives them a 404 (and is apparently trying to send them to wwwroot/course/1 -- which doesn't exist. My questions:

o Why isn't it sending them to wwwroot/login/change_password?
o How do I fix it?

The initial install was 1.5.2, but I just updated to 1.5.3+, and the problem persists.

Any assistance welcome!

-Aaron Munter
Average of ratings: -
In reply to Aaron Munter

Re: User can't change password?

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
When you use database authentication, you cannot change the password from Moodle. Moodle isn't authoritative with respect to passwords (that's why you use an external db), so you have to change the password somewhere else, outside of Moodle.

In order to allow users to change their passwords, Moodle allows you to specify an URL where something else has the knowlegde and will take the necessary steps to change the password in the auth db. You may specify this URL in the 'Change password URL' configuration variable, at the end of the db authentication method configuration page.

By default, this is just '1', which is why your students are sent to $wwwroot/course/1. If you specify 'http://some.where.else/change/my/password', then students will be sent there.

Saludos. Iñaki.
Average of ratings: Useful (1)
In reply to Iñaki Arenaza

Re: User can't change password?

by Aaron Munter -
Thanks, Iñaki. That was what I was afraid of, but really appreciate the confirmation. I will hack together a separate user admin script for our DB, and link it from the Change Pass URL variable.

I appreciate it!

-Aaron