Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ozoux <pierre@ozoux.net>2017-12-08 17:39:06 +0300
committerGitHub <noreply@github.com>2017-12-08 17:39:06 +0300
commit1282e99ebb3c7785578e68d5977937237b63afce (patch)
tree71aafcd014ce47d98de54f20fedeeea04b21d558
parent8c6dd3179060135816026bb87c1dac8a9f6cc60c (diff)
Properly merge master
-rw-r--r--user_external/lib/imap.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/user_external/lib/imap.php b/user_external/lib/imap.php
index 3608ecd1c..e53fb4605 100644
--- a/user_external/lib/imap.php
+++ b/user_external/lib/imap.php
@@ -46,6 +46,12 @@ class OC_User_IMAP extends \OCA\user_external\Base {
return false;
}
+ // Replace escaped @ symbol in uid (which is a mail address)
+ // but only if there is no @ symbol and if there is a %40 inside the uid
+ if (!(strpos($uid, '@') !== false) && (strpos($uid, '%40') !== false)) {
+ $uid = str_replace("%40","@",$uid);
+ }
+
$result = OC_DB::executeAudited(
'SELECT `userid` FROM `*PREFIX*preferences`'
. ' WHERE `appid` = "settings" AND `configkey` = "email" AND `configvalue` = ?',
@@ -56,12 +62,6 @@ class OC_User_IMAP extends \OCA\user_external\Base {
$users[] = $row['userid'];
}
- // Replace escaped @ symbol in uid (which is a mail address)
- // but only if there is no @ symbol and if there is a %40 inside the uid
- if (!(strpos($uid, '@') !== false) && (strpos($uid, '%40') !== false)) {
- $uid = str_replace("%40","@",$uid);
- }
-
if(count($users) === 1) {
$username = $uid;
$uid = $users[0];