mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
25 lines
379 B
MySQL
25 lines
379 B
MySQL
|
SET ANSI_NULLS ON
|
|||
|
GO
|
|||
|
SET QUOTED_IDENTIFIER ON
|
|||
|
GO
|
|||
|
|
|||
|
CREATE OR ALTER PROCEDURE [dbo].[User_ReadByEmails]
|
|||
|
@Emails AS [dbo].[EmailArray] READONLY
|
|||
|
AS
|
|||
|
BEGIN
|
|||
|
SET NOCOUNT ON;
|
|||
|
|
|||
|
IF (SELECT COUNT(1) FROM @Emails) < 1
|
|||
|
BEGIN
|
|||
|
RETURN(-1)
|
|||
|
END
|
|||
|
|
|||
|
SELECT
|
|||
|
*
|
|||
|
FROM
|
|||
|
[dbo].[UserView]
|
|||
|
WHERE
|
|||
|
[Email] IN (SELECT [Email] FROM @Emails)
|
|||
|
END
|
|||
|
GO
|