1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-01 13:43:23 +01:00
bitwarden-server/util/Migrator/DbScripts/2021-09-02_00_SsoUserReadyByUserIdOrganizationId.sql

22 lines
449 B
MySQL
Raw Normal View History

IF OBJECT_ID('[dbo].[SsoUser_ReadByUserIdOrganizationId]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[SsoUser_ReadByUserIdOrganizationId]
END
GO
CREATE PROCEDURE [dbo].[SsoUser_ReadByUserIdOrganizationId]
@UserId UNIQUEIDENTIFIER,
@OrganizationId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
*
FROM
[dbo].[SsoUserView]
WHERE
[UserId] = @UserId
AND [OrganizationId] = @OrganizationId
END