UFN_SYSTEMROLE_GETCUSTOMUSERNAMELIST

Returns a table of custom authentication user ids for all of the custom authentication users that belong to the given SYSTEMROLEID

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@SYSTEMROLEID uniqueidentifier IN

Definition

Copy


CREATE FUNCTION dbo.UFN_SYSTEMROLE_GETCUSTOMUSERNAMELIST(@SYSTEMROLEID uniqueidentifier)
/*
Returns a table of custom authentication user ids for all of the custom authentication users that belong to the given SYSTEMROLEID
*/
returns table
AS
RETURN
(
select U.CUSTOM_AUTHENTICATION_USERID, U.DISPLAYNAME
from dbo.APPUSER AS U
INNER JOIN dbo.SYSTEMROLEAPPUSER AS SRAU
ON U.ID=SRAU.APPUSERID
where SRAU.SYSTEMROLEID=@SYSTEMROLEID
and SRAU.FROMROLESYNC = 0
)