Enabling forgot password allows users to retrieve their FTP password from the log-in console. You'll need to write your own PHP function to handle the processes on your server.
First you'll need to enable forgot password in your settings.json file. You can use our wizard to configure this.
Create a PHP file named mftp_extensions.php and save it to your /mftp folder.
Copy the contents of the box below into the file:
Monsta FTP will pass the value $username, which is the user's FTP login, to your function:
Your function can return one of the three following results:
1. If there's no result returned the language variable FORGOT_PASSWORD_SUCCEEDED will be displayed on-screen.
2. If a result is returned then it will be displayed on-screen (a language variable can be substituted in.)
3. An exception is raised, which if raised with a message, will be displayed on-screen, otherwise the language variable FORGOT_PASSWORD_FAILED will be displayed on-screen.