Added an console command to convert local to SAML users and vice versa

This commit is contained in:
Jan Böhmer 2023-02-23 23:36:40 +01:00
parent c5904303e3
commit c831d57614
5 changed files with 165 additions and 4 deletions

View file

@ -89,4 +89,26 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
$this->getEntityManager()->flush();
}
}
/**
* Returns the list of all local users (not SAML users).
* @return User[]
*/
public function onlyLocalUsers(): array
{
return $this->findBy([
'saml_user' => false,
]);
}
/**
* Returns the list of all SAML users.
* @return User[]
*/
public function onlySAMLUsers(): array
{
return $this->findBy([
'saml_user' => true,
]);
}
}