CpanelAutoLogin service

This commit is contained in:
RainLoop Team 2014-04-11 21:49:00 +04:00
parent 2ad305e40e
commit f52be6fb66

View file

@ -820,6 +820,37 @@ class ServiceActions
}
}
/**
* @return string
*/
public function ServiceCpanelAutoLogin()
{
$oException = null;
$oAccount = null;
$sEmail = $this->oHttp->GetEnv('REMOTE_USER', '');
$sLogin = '';
$sPassword = $this->oHttp->GetEnv('REMOTE_PASSWORD', '');
if (0 < \strlen($sEmail) && 0 < \strlen(\trim($sPassword)))
{
try
{
$this->oActions->Logger()->AddSecret($sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sLogin, $sPassword);
$this->oActions->AuthProcess($oAccount);
}
catch (\Exception $oException)
{
$this->oActions->Logger()->WriteException($oException);
}
}
$this->oActions->Location('./');
return '';
}
/**
* @return string
*/