o365 error prevents login

o365 error prevents login

by Chris Swaffield -
Number of replies: 6

Oddly enough, this error has appeared once again. I have just completed upgrading to 3.1 and now no one can log in. I just get a blank white window after clicking the log in button. 

I was able to turn on debugging (via command line) and found this error message. 

Warning: require_once(/var/www/user/profile/field/o365/field.class.php): failed to open stream: No such file or directory in /var/www/user/profile/lib.php on line 574

Fatal error: require_once(): Failed opening required '/var/www/user/profile/field/o365/field.class.php' (include_path='/var/www/lib/pear:.:/usr/share/php:/usr/share/pear') in /var/www/user/profile/lib.php on line 574

I can't figure this out since I have either uninstalled or disabled all o365 plugins, including openID plugins. This has happened about a year ago (https://moodle.org/mod/forum/discuss.php?d=311031) and I took care of it then by disabling those plugins. Why this has returned is a mystery to me.

Is there a way to uninstall or remove plugins via command line, where would they be? 

Am I correct in assuming that if I remove them, this error would no longer surface and people can log in?

Average of ratings: -
In reply to Chris Swaffield

Re: o365 error prevents login

by Chris Swaffield -

Is there a way to uninstall or remove plugins via command line? if so, where would they be? 

Am I correct in assuming that if I remove them, this error would no longer surface and people can log in?



I can't even log in with my admin account. Any help would be appreciated. 
In reply to Chris Swaffield

Re: o365 error prevents login

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Try just deleting the folders from your moodle installation.  Should be found under auth folder, I suspect.

In reply to Emma Richardson

Re: o365 error prevents login

by Chris Swaffield -

Thanks Emma. However, the folder doesn't exist in my auth folder. 

In reply to Chris Swaffield

Re: o365 error prevents login

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Do you by chance have user accounts that are still showing that auth method?  That might cause an issue.  Try searching your user table in the database for o365 auth method and switching them over to manual if they exist (backup the table first of course!)

In reply to Emma Richardson

Re: o365 error prevents login

by Chris Swaffield -

I found three accounts in the user table that had oidc for auth method and I changed them. The rest were either manual or ldap. Unfortunately, I am still getting the same error.  

I did notice a bunch of tables in the database that had auth_oidc and local_o365 in their names. Do you think it is possible these were left behind after the plugins were uninstalled? Should they stay or can they be removed? 


Is there a way to get lib.php to stop referring to the o365 folder? Here is what line 574 looks like:


In reply to Chris Swaffield

Re: o365 error prevents login

by Chris Swaffield -

Solution found.

In order to be able to log in again, I had to copy the oidc and o365 folders into the /var/www/moodle/user/profile/field/ directory. That eliminated the error. I got these folders from a backup of the site from before my upgrade.