I have an enrollment plugin that generates unique course enrollment keys. Whenever I generate keys, i get the following notice...
Notice: Undefined property: stdClass::$username in C:\inetpub\mysite-dev.xrite.com\moodle\lib\moodlelib.php on line 5924
That's a core Moodle file though, any idea how I would go about fixing this? If I remove the line the problem goes away, but I'm guessing something else in Moodle relies on this.
I'm guessing the error is coming from the plugin. Is it from my database query?