Password change/expiration

Post here if you have some suggestions or you want to request a new feature.
Post Reply
ugobay
Posts: 4
Joined: Tue May 14, 2019 3:38 pm

Password change/expiration

Post by ugobay »

Hello,
I think a password expiration period should be added on each user.
A password expiration notice should be send to the user some days before the expiration allowing the user change his password without lose access.

Ugo
FTP
Site Admin
Posts: 1917
Joined: Tue Sep 29, 2009 6:09 am

Re: Password change/expiration

Post by FTP »

I think you can force user change password in specified period (like monthly), first you need to enable the option: "Domain > Settings > General Settings > Password & Security > Need to change the password on the first logon", and then enable the user option "Domain -> Users -> Edit an user -> User can change their password".

And then you can add a monthly task scheduler like the following script, just replace the domain name "demo" into your owns:

Code: Select all

   
   local domain = "demo"
   local strUserlist = c_GetUserList(domain)
   local userlist = Split(strUserlist, "\n")

   for _,username in pairs(userlist) do 
      local user = c_GetUser(domain, username)
      if user.last_loginip ~= nil and user.last_loginip ~= "" then 
	c_ResetUserStatistic(domain, username)
      end 
   end
Post Reply