2

I have an external SharePoint website where I need to set the password expiry policy.

After a certain period of time, e.g. 30 days, the user passwords expire and they are required to change it.

So in which way should I proceed?

  • What's the user backend? – Paolo Oct 20 '15 at 20:12
0

MySQL is used in the backend. However I achieved this using this Stored Procedure in MySQL .

CREATE PROCEDURE [dbo].[SP_Validate]
@Username nvarchar(50)
AS
BEGIN
declare @CreatedDate datetime
declare @DiffDate int
if exists( select top 1 * from Test_Users where UserName = @username)
begin 
select @CreatedDate = UpdateTime from Test_Users where UserName = @username;
SELECT @DiffDate = DATEDIFF(day,@CreatedDate,GETDATE()) ;
if(@DiffDate < 60)
select 1
else 
select 0
end
else 
begin 
select 0
end
END

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.