-
-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d32d25f
commit 63cd467
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -446,8 +446,10 @@ def AutoLogin(self, request=None, userID=None): | |
else: | ||
return ACLManager.loadError() | ||
|
||
# php = VirtualHost.getPHPString(self.data['PHPVersion']) | ||
# FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php) | ||
from managePHP.phpManager import PHPManager | ||
|
||
php = PHPManager.getPHPString(WPobj.owner.phpSelection) | ||
FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php) | ||
|
||
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission" | ||
data = { | ||
|
@@ -465,11 +467,11 @@ def AutoLogin(self, request=None, userID=None): | |
|
||
password = randomPassword.generate_pass(10) | ||
|
||
command = 'sudo -u %s wp user create autologin %s --role=administrator --user_pass="%s" --path=%s --skip-plugins --skip-themes' % ( | ||
command = f'sudo -u %s {FinalPHPPath} /usr/bin/wp user create autologin %s --role=administrator --user_pass="%s" --path=%s --skip-plugins --skip-themes' % ( | ||
WPobj.owner.externalApp, '[email protected]', password, WPobj.path) | ||
ProcessUtilities.executioner(command) | ||
|
||
command = 'sudo -u %s wp user update autologin --user_pass="%s" --path=%s --skip-plugins --skip-themes' % ( | ||
command = f'sudo -u %s {FinalPHPPath} /usr/bin/wp user update autologin --user_pass="%s" --path=%s --skip-plugins --skip-themes' % ( | ||
WPobj.owner.externalApp, password, WPobj.path) | ||
ProcessUtilities.executioner(command) | ||
|
||
|