Odd MoodleCloud login behavior - can't log in

Odd MoodleCloud login behavior - can't log in

by Rick Jerz -
Number of replies: 10
Picture of Particularly helpful Moodlers Picture of Testers

I am experiencing an odd problem with my MoodleCloud account.  Yesterday, I was unable to log in.  So I reset my password using the "Forgot password..." procedure.  I get my confirmation email, click on the link, reset my password, and I am in.  But if I log out and try logging back in, I can't.  I have tried from a variety of browsers, thinking it was something with my browser or browser cache, but I cannot log in.  I can do another "Forgot password..." routine, reset my password, and I am in, but every time I log out I can't log in.

My there be some odd restriction on my account?  This began happening after I imported a course (which never seemed to really finish, yet has seemed to import just fine.

https://rjerz.moodlecloud.com.

Average of ratings: -
In reply to Rick Jerz

Re: Odd MoodleCloud login behavior - can't log in

by Jordan Tomkinson -

Hi Rick,

It looks like you renamed your admin account username to 'rjerz', can you try logging in with that username and the password you set via the reset password form.

If tha doesn't work, we will need to reset your admin account

In reply to Jordan Tomkinson

Re: Odd MoodleCloud login behavior - can't log in

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Jordan, thanks for your reply.

My username has always been rjerz.  I tried logging in again today, and could not.  Then, I used the reset password tool.  I got my email, clicked on the link, reset my password, and was in.  Then I logged out and tried logging back in using rjerz and my new password.  I could not log in. Tried from a different browser too, no luck.

So this is what I have been experiencing.  I can use the password reset tool to get back in, but can't log in after that.

I wonder if I should change my username to something different and see if that works.

Anything that you can do to fix this would be appreciated.

Attachment Reset Email.jpg
In reply to Rick Jerz

Re: Odd MoodleCloud login behavior - can't log in

by Jordan Tomkinson -

Hi Rick,

Upon further inspection of your site it seems this problem was caused by you having 2 users both with the same username of 'rjerz'.

One was an admin account, the other was not. the MoodleCloud auth plugin was getting confused by these duplicate users and failing the login process.


I believe having duplicate users would cause many issues in Moodle itself, so I have gone ahead and rename your admin user back to 'admin' and filed a bug internally to investigate how this happened in the first place.

Average of ratings: Useful (2)
In reply to Jordan Tomkinson

Re: Odd MoodleCloud login behavior - can't log in

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Okay Jordan.  Interesting problem.

The duplicate username occurred because I imported a course from my production moodle where I use the same username, and I am also the manager of my production system.

Thanks for finding this problem.  I have made the necessary adjustments and am now good to go.

I wonder if I should report this as a "bug".  Might this problem exist in a normal install of Moodle, and when restoring courses, or is it something that just exists on MoodleCloud?

In reply to Rick Jerz

Re: Odd MoodleCloud login behavior - can't log in

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Sorry to butt in, Rick, but AFAIK, it doesn't occur in the production Moodle. Usually the permissions go with the courses, so when restoring a course, where I am listed as a Teacher in that course, I am a Teacher there,  but that does not interfere with the Admin rights I have for the site. I am certain that I can still access the Site Admin menu from a course, but I am listed as a Teacher, not an Admin. My understanding of the Permissions and Capabilities of Roles for a single user in a production Moodle is that the Admin Role gets the priority, otherwise it is strictly contextual. (Not sure iof this throws any light on your issue, but I am suggesting this is something only relating to MoodleCloud.) 

In reply to Colin Fraser

Re: Odd MoodleCloud login behavior - can't log in

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I'm hasarding a guess that it might have something to do with the new setting which allows duplicate admin restore when restoring courses? See docs Course restore

(Although the admin name is changed)

In reply to Mary Cooch

Re: Odd MoodleCloud login behavior - can't log in

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Mary, you might be on to something.  Maybe this never occurred in the past because moodle didn't allow for duplicates.  Now that it does, this might present a problem if the duplicate user is also the system's manager.

In my case, after importing a course, I had two "rjerz" userids.  Then, when I tried to log in, MoodleCloud didn't know who I really was and didn't allow me to log in.

So I created another moodlecloud account for me, repeated the process, and I think I ended up with the same problem  Below is a copy of the error message that my second moodlecloud account provides.

Interesting problem.  What might be the best solution when importing courses?  Should Moodle provide a warning?  Your thoughts?

Attachment Moodlecloud.jpg
In reply to Rick Jerz

Re: Odd MoodleCloud login behavior - can't log in

by Jordan Tomkinson -

The problem here isn't to do with duplicate admins or imported permissions, but duplicate users with the same username related to the restore.

This is not a MoodleCloud specific issue, as MoodleCloud has no custom code related to restoring backups.

The original user 'rjerz' was an admin, the newly imported second 'rjerz' was not an admin, so the new feature ( $CFG->forced_plugin_settings['backup']['import_general_duplicate_admin_allowed'] ) would not stop this from happening.

I haven't tested it, but I feel this is a core Moodle issue that should be raised in the tracker.

Average of ratings: Useful (1)
In reply to Jordan Tomkinson

Re: Odd MoodleCloud login behavior - can't log in

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Jordan, maybe so.  But in the exported course, I was admin.  Yes, rjerz in both the Moodlecloud system as admin, and as rjerz in the originally backed up course. 

Yes, this will take some testing to verify the exact problem.  I think that I can recreate the problem.  I'll give it a try.

In reply to Jordan Tomkinson

Re: Odd MoodleCloud login behavior - can't log in

by Fergus Wood -

I have the same issue right now, that I am unable to log back into my MoodleCloud with the single admin user that exists in the system.

The cause is likely to be:

- I created two course, one as LTI provider and one as LTI consumer

- i linked myself across from the one course to the other

- started getting odd behaviour in the UI

- logged out and now cannot log back in 

- changing password results in error message: "The email address is shared by several accounts, please enter username instead"


I suspect that i have created a new SSO user in opening the LTI connection. This new user has the same email as my admin account. Hence the problem that i cannot log in.


Can someone delete the 2nd SSO user in my Moodle Cloud?  (fitchlearning.moodlecloud.com)