Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@ public function register(IRegistrationContext $context): void {
public function boot(IBootContext $context): void {
// ...
}

}
20 changes: 9 additions & 11 deletions lib/private/NavigationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,15 @@ private function init(bool $resolveClosures = true): void {
}

$logoutUrl = \OC_User::getLogoutUrl($this->urlGenerator);
if ($logoutUrl !== '') {
// Logout
$this->add([
'type' => 'settings',
'id' => 'logout',
'order' => 99999,
'href' => $logoutUrl,
'name' => $l->t('Log out'),
'icon' => $this->urlGenerator->imagePath('core', 'actions/logout.svg'),
]);
}
// Logout
$this->add([
'type' => 'settings',
'id' => 'logout',
'order' => 99999,
'href' => $logoutUrl,
'name' => $l->t('Log out'),
'icon' => $this->urlGenerator->imagePath('core', 'actions/logout.svg'),
]);

if ($this->isSubadmin()) {
// User management
Expand Down
6 changes: 5 additions & 1 deletion lib/private/legacy/OC_User.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public static function isIncognitoMode(): bool {

/**
* Returns the current logout URL valid for the currently logged-in user
* @return non-empty-string
*/
public static function getLogoutUrl(IURLGenerator $urlGenerator): string {
$backend = self::findFirstActiveUsedBackend();
Expand All @@ -288,7 +289,10 @@ public static function getLogoutUrl(IURLGenerator $urlGenerator): string {
if ($user instanceof IUser) {
$backend = $user->getBackend();
if ($backend instanceof ICustomLogout) {
return $backend->getLogoutUrl();
$logoutUrl = $backend->getLogoutUrl();
if ($logoutUrl !== '') {
return $logoutUrl;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/public/Authentication/IApacheBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function isSessionActive();
/**
* Gets the current logout URL
*
* @return string
* @return non-empty-string
* @since 12.0.3
*/
public function getLogoutUrl();
Expand Down
Loading