Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d117a0ab authored by Ronak Patel's avatar Ronak Patel
Browse files

password change event listener not working - logger issue

parent b007f62c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
    <description><![CDATA[in /e/OS cloud, nextcloud accounts are linked to mail accounts. This app ensures both are coordinated: it sets the e-mail address, quota and storage of the user upon creation.
    It also completes the account deletion by cleaning other parts of the /e/OS cloud setup to ensure no more data is retained when a user requests an account deletion.
    This app uses the UserDeletedEvent to invoke scripts in the docker-welcome container of /e/OS cloud setup]]></description>
    <version>13.1.0</version>
    <version>13.1.1</version>
    <licence>agpl</licence>
    <author mail="dev@murena.com" homepage="https://murena.com/">Murena SAS</author>
    <namespace>EcloudAccounts</namespace>
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class PasswordUpdatedListener implements IEventListener {
	private IUserSession $userSession;
	private TokenProvider $tokenProvider;

	public function __construct(SSOService $ssoService, ILogger $logger, ISession $session, IUserSession $userSession, TokenProvider $tokenProvider) {
	public function __construct(SSOService $ssoService, LoggerInterface $logger, ISession $session, IUserSession $userSession, TokenProvider $tokenProvider) {
		$this->ssoService = $ssoService;
		$this->logger = $logger;
		$this->session = $session;
@@ -54,14 +54,14 @@ class PasswordUpdatedListener implements IEventListener {
		try {
			$this->tokenProvider->invalidateTokensOfUser($username, null);
		} catch (Exception $e) {
			$this->logger->logException($e, ['app' => Application::APP_ID]);
			$this->logger->error($e, ['app' => Application::APP_ID]);
		}

		// Finally, log out the current session (also clears remember-me cookies)
		try {
			$this->userSession->logout();
		} catch (Exception $e) {
			$this->logger->logException($e, ['app' => Application::APP_ID]);
			$this->logger->error($e, ['app' => Application::APP_ID]);
		}
	}
}
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ class SSOService {
			$this->setupUserId($username);
		}


		$url = $this->ssoConfig['admin_rest_api_url'] . self::USERS_ENDPOINT . '/' . $this->currentUserId . '/logout';

		$this->logger->debug('logout calling SSO API with url: '. $url);