Merge pull request #30812 from nextcloud/backport/30795/stable22

This commit is contained in:
John Molakvoæ 2022-01-22 14:09:54 +01:00 committed by GitHub
commit 067781e55b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,14 +108,12 @@ class SMB extends Backend {
if (empty($realm)) {
$realm = 'WORKGROUP';
}
$userPart = $matches[1];
$domainPart = $matches[2];
if (count($matches) === 0) {
$username = $user;
$workgroup = $realm;
} else {
$username = $userPart;
$workgroup = $domainPart;
$username = $matches[1];;
$workgroup = $matches[2];
}
$smbAuth = new BasicAuth(
$username,