USP_AUTHENTICATE_CMS_AUTOLOG_TOKEN

Retrieving token if request user is authenticated.

Parameters

Parameter Parameter Type Mode Description
@TOKEN uniqueidentifier IN
@USERID int INOUT

Definition

Copy


create procedure dbo.USP_AUTHENTICATE_CMS_AUTOLOG_TOKEN
(
  @TOKEN uniqueidentifier,
    @USERID int = 0 output
)
as
begin
  declare @uid nvarchar(8)

    declare @temp TABLE(BinaryData image, TextData ntext);
    insert into @temp exec [dbo].[spTempDataFetch] @TOKEN;
    select @uid = TextData from @temp;
  set @USERID=cast(@uid as int)

  --remove token once we get the id so it will only get used once

  delete from dbo.TempData where ID = @TOKEN;

end