From e064ee42632959de7b03996556580e6eb5616076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Tue, 21 Feb 2023 21:58:27 +0100 Subject: [PATCH] Prevent change of password of SAML users via CLI --- src/Command/User/SetPasswordCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Command/User/SetPasswordCommand.php b/src/Command/User/SetPasswordCommand.php index aeab0d36..66e6e97e 100644 --- a/src/Command/User/SetPasswordCommand.php +++ b/src/Command/User/SetPasswordCommand.php @@ -78,6 +78,11 @@ class SetPasswordCommand extends Command $io->note('User found!'); + if ($user->isSamlUser()) { + $io->error('This user is a SAML user, so you can not change the password!'); + return 1; + } + $proceed = $io->confirm( sprintf('You are going to change the password of %s with ID %d. Proceed?', $user->getFullName(true), $user->getID()));