Authentication Hook

The authentication hook allows checking for a username and password pair in an external system, for example, LDAP. To do this, you need to extend the class pm_Hook_Auth. The class must be located in the directory plib/hooks/.


Below is an example of such a hook, using the method

Use the following code:

class Modules_MyExtension_Auth extends pm_Hook_Auth
        public function auth($login, $password)
            // TODO: add your implementation here

The method must return a boolean value. If a username and password pair is valid, it should return true.

You can control the operation of the extension during run-time by implementing the method isEnabled().


Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.