-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Cannot set admin's e-mail address #13127
Comments
Hello, I tried on my instance (Nextcloud 15.0.0), and it worked fine.
If I go to " Settings", I can now see the email address. I did the same to delete, and it worked too. Could you provide last entries of the log file after you try? (I have no SMTP server configured) Regards, Olivier |
Hi Olivier, Yes, that's correct, that's exactly what I do too, but as I said for me it does not work for the admin user. It does work for other users (well, I actually only have one other user). Here are the last couple of lines form the logfile. I see no relevant error there. I tried setting the admin's e-mail address many times since the version upgrade in the logfile.
Thanks for the help, |
If it can help, you can increase the log verbosity: then try again. Just for comparison, I got those 4 lines when I pressed the enter button: Do you have any errors on your web server logs? Is it failing only with the email field? Or same behaviour with any Admin info (Full name, language, etc)? Regards, Olivier |
Hi,
I made a small screen recording to demonstrate the issue and the above points. I shared it using my NextCloud: link |
Hello Karoly, If all log levels are configured, you must get something in the Nextcloud.log file. 'loglevel' => 0, Regards, Olivier |
Ok, I had loglevel 1 in config.php, now I set it to 0. Setting the admin's e-mail or display name still produces no new lines in the logfile. Setting the loglevel to 0 worked though, because now setting the non-admin's e-mail produces the following messages:
|
@skjnldsv could you post your howto here how to share the output from browser inspector? |
Hello! How to access your browser console (Click to expand)Chrome
Safari
IE9
Firefox
Opera
|
Hi, I did the following:
Here are the contents of the console after the above actions:
There were no errors during the reload, except for the warning concerning the polyfill. After the reload, the failed action added two more lines to the console. I expanded the one with the error to be able to see the details. |
Are you the admin? Or the sub admin? |
Yes, I am the admin. |
Could you add (respectively) 1, 2 and 3 in the
|
And then redo the screenshot and response content from above? What output should I supply after injecting these lines? |
Only the output of the response tab |
Hmmm... these lines look different on my server. Let me try upgrading to the newest NC version first. |
@pylorak lines could be different, but you should find the similar lines on the edituser function :) |
I only upgraded to 15.0.10 because NC 16 requires PHP 7.1 and I only have 7.0. Upgrading PHP is a "bit" more work so NC 15 it is for now, sorry. I think I was able to find the corresponding lines, I also crosschecked with the GitHub code-links that you pasted earlier. The response payload now is: |
So, it means you're trying to change a value that you're not allowed to change. throw new OCSException([$key, $permittedFields], \OCP\API::RESPOND_UNAUTHORISED); |
Then no exception is thrown. The request succeeds but the new value is not saved. Error log says:
|
AH damn, sorry it is supposed to be a string. throw new OCSException(json_encode([$key, $permittedFields]), \OCP\API::RESPOND_UNAUTHORISED); |
|
Could you share your config.php? |
Can it be an error in the upgrade script (or an old version of the upgrade script)? This installation used to be an old owncloud instance, which has been upgraded multiple times, then at one point it was upgraded to nextcloud, and of course has also been upgraded many times since. Maybe an upgrade script in the past forgot to add the necessary permissions for the admin user? |
You have allow_user_to_change_display_name to false, therefore you cannot change the email nor displayname :) |
@skjnldsv is on fire today 👍 server/apps/provisioning_api/lib/Controller/UsersController.php Lines 439 to 443 in a8a5594
server/config/config.sample.php Lines 221 to 225 in 465e919
It's not obvious but you cannot change the email if |
Aahhh.... yeah totally not obvious, for many different reasons:
Thanks for the help. I recommend slightly changing how this setting works (see my points above why), or at least improving the documentation. |
See other issues, closing to avoid duplicates |
I log in as the admin user, and I go to Users. After entering a valid e-mail address (previously missing) for the admin, I get error "An error occured during the request. Unable to proceed." Refreshing the page or loading Settings->Personal Info confirms that the e-mail address has not been saved.
In Setttings->Logging no message is visible.
Setting the e-mail address (changing and adding both) works as expected for other (non-admin) users.
Nextcloud version: 15.0.0 (but issue also existed on 14.0.3)
EDIT: Here is a screen recording demonstrating the issue: link
The text was updated successfully, but these errors were encountered: