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

IMAP: set Nextcloud user's email based on login username #265

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

K-os
Copy link

@K-os K-os commented Feb 11, 2025

Fixes: #12

Changes proposed in this pull request:
When a user logs in for the first time using the IMAP backend and the username looks like an email address (contains '@'), the Nextcloud user's email address is set accordingly. This can be configured with a seventh parameter to the IMAP backend config.

When the login username looks like an email address (contains '@'), the
Nextcloud user's email address is set accordingly. This can be configured
with a seventh parameter to the IMAP backend config.
This only happens on first login of a user (equivalent to the group
feature).

Signed-off-by: Gabriel Hege <[email protected]>
@K-os
Copy link
Author

K-os commented Feb 11, 2025

Oh sorry. I just realized this is kind of a duplicate of #263 with two differences:

  • Here $createduser->setSystemEMailAddress($email) is called, whereas Add email with IMAP backend #263 uses $config->setUserValue( $uid, 'settings', 'email', $email);. I don't know if this makes any difference.
  • This PR adds a config parameter for the IMAP backend.

If none of these differences matter, feel free to close this PR.

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

Successfully merging this pull request may close these issues.

Automatically set user email and display name
1 participant