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?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI 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?
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