Fix abstract passwords in host/domain manage planel logins

This commit is contained in:
Deon George
2012-06-22 15:12:59 +10:00
parent 0eecfe8abd
commit df82268405
12 changed files with 93 additions and 42 deletions

View File

@@ -22,10 +22,11 @@ class Controller_User_Service extends Controller_TemplateDefault_User {
$so = ORM::factory('service',$this->request->param('id'));
$k = Session::instance()->get_once('manage_button');
$amo = $so->plugin(isset($_REQUEST['t']) ? $_REQUEST['t'] : '');
$o = array(
'u'=>$so->plugin()->host_username ? $so->plugin()->host_username : strtolower($so->plugin()->name()),
'p'=>(! $k OR ! $this->request->is_ajax() OR ! $so->loaded() OR ! isset($_REQUEST['k']) OR $k != $_REQUEST['k']) ? Random::char() : $so->plugin()->host_password,
'u'=>$amo->username_value() ? $amo->username_value() : strtolower($amo->name()),
'p'=>(! $k OR ! $this->request->is_ajax() OR ! $so->loaded() OR ! isset($_REQUEST['k']) OR $k != $_REQUEST['k']) ? Random::char() : $amo->password_value(),
);
$this->response->headers('Content-Type','application/json');