/** * The handler for the own details. * * @param mixed $handler_id the array key from the request array * @param array $args the arguments given to the handler * @param Array &$data The local request data. * @return boolean Indicating success. */ function _handler_ownDetails($handler_id, $args, &$data) { $this->_request_data['name'] = "fi.kilonkipinat.account"; $title = $this->_l10n_midcom->get('index'); $_MIDCOM->set_pagetitle(":: {$title}"); $person = new fi_kilonkipinat_account_person_dba($_MIDGARD['user']); if ($person) { if (!$person->can_do('midgard:owner')) { $_MIDCOM->auth->request_sudo(); $person->set_privilege('midgard:owner', "user:{$person->guid}"); // midcom_baseclasses_core_dbobject::set_privilege($person, 'midgard:owner', "user:{$person->guid}", MIDCOM_PRIVILEGE_ALLOW); $_MIDCOM->auth->drop_sudo(); } $_MIDCOM->relocate($this->_request_data['prefix'] . 'person/view/' . $person->guid . '/'); } else { $_MIDCOM->relocate($this->_request_data['prefix']); } return true; }