webservice/application/views/helpers/ProfileLink.php

17 lines
509 B
PHP
Raw Normal View History

2013-11-05 12:18:30 +01:00
<?php
class Zend_View_Helper_ProfileLink extends Zend_View_Helper_Abstract
{
public function profileLink()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$username = $auth->getIdentity()->username;
$logoutUrl = $this->view->url(array(
'controller' => 'user',
'action' => 'logout'
), null, true);
return '<a href="'.$logoutUrl.'" alt="Se déconnecter">Déconnexion : ' . $username . '</a>';
}
}
}