-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ac/jmccannon/pm-10317-email-user-domain-veri…
…fied # Conflicts: # src/Core/AdminConsole/OrganizationFeatures/OrganizationDomains/VerifyOrganizationDomainCommand.cs
- Loading branch information
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
util/Migrator/DbScripts/2024-11-26-00_OrgUserSetStatusBulk.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CREATE PROCEDURE [dbo].[OrganizationUser_SetStatusForUsersById] | ||
@OrganizationUserIds AS NVARCHAR(MAX), | ||
@Status SMALLINT | ||
AS | ||
BEGIN | ||
SET NOCOUNT ON | ||
|
||
-- Declare a table variable to hold the parsed JSON data | ||
DECLARE @ParsedIds TABLE (Id UNIQUEIDENTIFIER); | ||
|
||
-- Parse the JSON input into the table variable | ||
INSERT INTO @ParsedIds (Id) | ||
SELECT value | ||
FROM OPENJSON(@OrganizationUserIds); | ||
|
||
-- Check if the input table is empty | ||
IF (SELECT COUNT(1) FROM @ParsedIds) < 1 | ||
BEGIN | ||
RETURN(-1); | ||
END | ||
|
||
UPDATE | ||
[dbo].[OrganizationUser] | ||
SET [Status] = @Status | ||
WHERE [Id] IN (SELECT Id from @ParsedIds) | ||
|
||
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationUserIds] @OrganizationUserIds | ||
END |