sharing notification by email not working for never logged on users
Steps to reproduce
- have ldap connection setup
- share file with user (from LDAP) that has never logged on yet
- select notifiy by email (email address also from LDAP)
Expected behaviour
ownCloud send email to the email address, also when this person has not yet logged into ownCloud. This is important to introduce the new service all employees quickly!
Actual behaviour
ownCloud warns the share creator, that no email can be sent!

Server configuration
Operating system: sles 12 Web server: apache 2.4 Database: Oracle Rac PHP version: 5.5.14 ownCloud version: (see ownCloud admin page) 8.0.3 Updated from an older ownCloud or fresh install: 7.0.5 The content of config/config.php:
Insert your config.php content here
(Without the database password, passwordsalt and secret)
Are you using external storage, if yes which one: local/smb/sftp/... no Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... MS AD
Client configuration
Firefox Browser:
Operating system: Win 7
There is no ownCloud log entry for the warning in in the image picture above!
@blizzz
@blizzz would it be possible to have a look and let us know what you think?
I have a look
Ok, I confirmed, but when attempting to send the notification again (by unchecking and rechecking that box again) it works also without logging in. Some bad timing? Investigating.
The update of user info is triggered by userExists check. However, when we fetch users from LDAP, they are being cached as existing, so it won't be done until the cache invalidates (and my cache TTL is short for dev purposes). The propper solution is to read all necessary values when fetching the users and storing them at that time.
There is an PR in preparation (and was a bit forgotten :cry:) that would lay the foundations to it: https://github.com/owncloud/core/pull/12943
It needs to be extended to read the attributes also on searches and set them there as well.
@blizzz How big a change is this, and how likely to break things?
@MTRichards what's already there touches 4 source files and a test one. Ca. 160 new lines, and 60 removed. So the changeset is not that big yet, but many files are included, so it's a bit more complex. This will increase with the missing bits however. Additionally, it needs to be rebased first and conflicts resolved, as the code evolved.
I would not feel to comfortable to backport it. Down to OC 8.1 at most, with enough development and testing time (i.e. not 8.1.1).
@cmonteroluque If we can't get it back to 8.0, we need to discuss given the priority of this from @CaptionF
@MTRichards @cmonteroluque Checked with prospect: Early September (so 8.1.2 ?) would be just in time! Later would be really bad.
Ok, but 8.1 is ok then. Great. @cmonteroluque for folding into 8.1.2.
Hey guys just for tracking can we assign this the needed milestone?
mentioned it, but didn't apply milestone. Doh!
@MTRichards thanks for adding the milestone. I only just saw the last few exchanges
@blizzz The PR is still WIP and 8.1.2 is not that far away. Can I somehow help you?
i squeeze it in today
Since the ldap code diverged too much I opened a new PR – propper rebasing was not possible. It goes here: https://github.com/owncloud/core/pull/18469
Testing/Review needed. If it is good and we get it #18469 into master, I can do the backport.
@blackm How like is it that this will make it into 8.1.2? See https://github.com/owncloud/core/issues/17362#issuecomment-124083659 :confused:
@blackm Sorry. Wrong autocomplete :disappointed: I meant @blizzz :)
@MorrisJobke depends on reviews, in one week there was just one brief one, from tkaufm. no i need to rebase anyway.