Problem from the latest commit of a couple hours ago.
A notice is displayed unless debugging is set to minimal because the variable is not defined on user creation. I saw this on creating new users on a fresh install.
Since MDL-15516 is blocked, I assume the original bug might be a security issue, although the above change should be made to avoid notices. But that is why I marked this as a possible security issue.