user_external
user_external copied to clipboard
IMAP: set Nextcloud user's email based on login username
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.
Oh sorry. I just realized this is kind of a duplicate of #263 with two differences:
- Here
$createduser->setSystemEMailAddress($email)is called, whereas #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.