Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Undefined property: stdClass::$email in /var/www/vhosts/azubi49.de/httpdocs/auth/enrolkey/auth.php on line 264 #52

Open
wemakefuture opened this issue Aug 4, 2020 · 5 comments
Labels

Comments

@wemakefuture
Copy link

image

Hello getting following error. Sign Up is still working. Moodle 3.9.1., Nginx, Linux 18.04. Maria DB 10.3.

Issue Message:

Notice: Undefined property: stdClass::$email in /var/www/vhosts/azubi49.de/httpdocs/auth/enrolkey/auth.php on line 264
Um sicherzugehen, dass sich niemand unberechtigt über die von Ihnen angegebene E-Mail anmeldet, wird eine automatische Benachrichtigung an diese Adresse {$a} gesendet.

Die Benachrichtigung enthält eine Anleitung, wie Sie Ihre Registrierung bestätigen. Danach sind Sie auf dieser Moodle-Seite registriert und können sofort loslegen.

Bei Problemen wenden Sie sich bitte an die Administrator/innen der Website.

@brendanheywood
Copy link
Contributor

Can you shed any light on the preconditions, ie does this happen with all users or only certain users, or when certain fields are not filled out? the $USER->email field is pretty standard was this used with a weird user with no email address?

@wemakefuture
Copy link
Author

stdClass::$email in /var/www/vhosts/azubi49.de/httpdocs/auth/enrolkey/auth.php on line 264

Sadly still getting the error.

Tested it now. I get it with newly signed up users after they created an account and have to verify their email.

@brendanheywood
Copy link
Contributor

@wemakefuture you still haven't shared any steps on how to reproduce this. Can you start by please confirming you are on the latest version from this git repo? Those line numbers don't match any code around email so I suspect it is not the latest

@wemakefuture
Copy link
Author

wemakefuture commented Nov 12, 2020

Hi @brendanheywood we are on the latest version.

I jumped in to line 264 of the auth.php (I am mostly a python dev.) there I don't see the variable email:

public function user_confirm($username, $confirmsecret) { global $DB; $user = get_complete_user_data('username', $username); if (!empty($user)) { if ($user->auth != $this->authtype) { return AUTH_CONFIRM_ERROR; } else if ($user->secret == $confirmsecret && $user->confirmed) { return AUTH_CONFIRM_ALREADY; } else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in. $DB->set_field("user", "confirmed", 1, array("id" => $user->id)); return AUTH_CONFIRM_OK; } } else { return AUTH_CONFIRM_ERROR; } }

So my assumption was to auth_enrolkey | emailconfirmation to "no"

and the error disappeared when I now sign up I dont get any error.
image

@brendanheywood
Copy link
Contributor

hhmm that is just weird. At least we are on the same page as to the code on disk. But the error message line numbers still don't match anything useful so I don't really know what that means. Do you get anything better out of the web server error logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants