mirror of
https://github.com/bitwarden/server.git
synced 2025-07-06 18:42:49 -05:00
users listing page
This commit is contained in:
@ -224,5 +224,6 @@
|
||||
<Build Include="dbo\Stored Procedures\Event_ReadPageByCipherId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Event_ReadPageByOrganizationIdActingUserId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Organization_ReadAbilities.sql" />
|
||||
<Build Include="dbo\Stored Procedures\User_SearchByEmail.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
19
src/Sql/dbo/Stored Procedures/User_SearchByEmail.sql
Normal file
19
src/Sql/dbo/Stored Procedures/User_SearchByEmail.sql
Normal file
@ -0,0 +1,19 @@
|
||||
CREATE PROCEDURE [dbo].[User_SearchByEmail]
|
||||
@Email NVARCHAR(50),
|
||||
@Skip INT = 0,
|
||||
@Take INT = 25
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
DECLARE @EmailLikeSearch NVARCHAR(55) = @Email + '%'
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[UserView]
|
||||
WHERE
|
||||
(@Email IS NULL OR [Email] LIKE @EmailLikeSearch)
|
||||
ORDER BY [Email] ASC
|
||||
OFFSET @Skip ROWS
|
||||
FETCH NEXT @Take ROWS ONLY
|
||||
END
|
Reference in New Issue
Block a user