aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/api/server2server.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-02-20 13:09:33 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-04-13 11:50:09 +0200
commit66bc8145a99e5de7719eec3d2b19741b7424b23e (patch)
treecd0146974d893fc99b8da86e4ec2945df601b887 /apps/files_sharing/api/server2server.php
parentc3fbc2b6fd09bb5b94112da9248cae28d6ef85e3 (diff)
downloadnextcloud-server-66bc8145a99e5de7719eec3d2b19741b7424b23e.tar.gz
nextcloud-server-66bc8145a99e5de7719eec3d2b19741b7424b23e.zip
allow login names to be used for s2s with LDAP users
Diffstat (limited to 'apps/files_sharing/api/server2server.php')
-rw-r--r--apps/files_sharing/api/server2server.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/api/server2server.php b/apps/files_sharing/api/server2server.php
index 3ecdf65dc74..b578ba663d5 100644
--- a/apps/files_sharing/api/server2server.php
+++ b/apps/files_sharing/api/server2server.php
@@ -49,6 +49,14 @@ class Server2Server {
return new \OC_OCS_Result(null, 400, 'The mountpoint name contains invalid characters.');
}
+ \OCP\Util::writeLog('files_sharing', 'shareWith before, ' . $shareWith, \OCP\Util::DEBUG);
+ \OCP\Util::emitHook(
+ '\OCA\Files_Sharing\API\Server2Server',
+ 'preLoginNameUsedAsUserName',
+ array('uid' => &$shareWith)
+ );
+ \OCP\Util::writeLog('files_sharing', 'shareWith after, ' . $shareWith, \OCP\Util::DEBUG);
+
if (!\OCP\User::userExists($shareWith)) {
return new \OC_OCS_Result(null, 400, 'User does not exists');
}