Third Party Contributions > API Based Plugins

Password plugin for cPanel

(1/1)

jigster:
I can't get the 'password' plugin to work with cPanel. I modified the plugin's 'cpanel' driver so that the username is the full email address (otherwise it errors). It also failed on the existing password check but commenting that out in the code works for now (for testing just to see if I can get the rest to work). Now, even though it says the password change succeeds, the password is never changed. If anyone else has done this recently, any instructions or help would be appreciated! Thanks

jigster:
Ignore the above, I've got it working now, it was a typo! For any one else that needs this, all I did to the password plugin was set $config['password_driver'] = 'cpanel' and $config['password_cpanel_host'] = 'server hostname'. Then in drivers/cpanel.php I changed from this


--- Code: ---$data = [
'email' => password::username('%l'),
'password' => $newpass
];
--- End code ---

to this


--- Code: ---$data = [
'email' => password::username('%u'),
'password' => $newpass
];
--- End code ---

Navigation

[0] Message Index

Go to full version