url(array('controller'=>''), 'default', true); * * @param array $data * @return Zend_View_Helper_UserData */ public function UserInfo($ar = null, $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $setPos = 0) { if ($ar !== null && is_array($ar)) { $this->items = $ar; } return $this; } /** * Turn helper into string * * @param string|null $indent * @param string|null $locale * @return string */ public function __toString($indent = null, $locale = null) { $session = Zend_Registry::get('session'); $this->items = $session->authdata; $output = ''; if ($session->authdata['authed'] !== true) return $output; # $indent = (null !== $indent) # ? $this->getWhitespace($indent) # : $this->getIndent(); $indent = ''; $output .= $indent . "
\n"; $output .= $indent . "\tUser: " . $this->items['authed_username'] . "
\n"; $output .= $indent . "\tName: " . $this->items['authed_fname'] . ' ' . $this->items['authed_lname'] . "
\n"; $output .= $indent . "\tRole: " . $this->items['authed_role'] . "
\n"; if ($this->items['authed_by_crt'] === true) $output .= $indent . "\tLoginmethod: CRT
\n"; else $output .= $indent . "\tLoginmethod: PASSWD
\n"; $output .= $indent . "
\n"; return $output; } }