Subversion Repositories Applications.gtt

Rev

Rev 48 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

class GttCtrlActionIdentification extends aControlleurAction {
        
        public function __construct(Registre $Registre)
    {
        $Registre->ajouterEspace('Identification', 'identification');
        $Registre->ajouterSquelette('identification', 'connexion.tpl.html');
    }
    
    public function executer()
    {
        $aso_identification = array();
        $this->getRegistre()->ajouterSquelette('identification', 'identite.tpl.html');          
        //$GLOBALS['_GTT_']['auth']->logout();
        $aso_identification['nom'] = $GLOBALS['_GTT_']['Utilisateur']->getNom();
        $aso_identification['prenom'] = $GLOBALS['_GTT_']['Utilisateur']->getPrenom();
        
        //echo '<pre>'.print_r($aso_identification, true).'</pre>';
                $this->getRegistre()->ajouterDonnee('identification', $aso_identification);
    }
    
    public function executerDeconnexion()
    {
        $aso_connexion = array();
                $this->getRegistre()->setTitre('Bienvenue sur GTT!');
        // Création de l'url de réponse du formulaire
                $aso_connexion['url'] = 'index.php?action='.GTT_ACTION_CONNEXION;
        $GLOBALS['_GTT_']['auth']->logout();
        
        //echo '<pre>'.print_r($aso_connexion, true).'</pre>';
                $this->getRegistre()->ajouterDonnee('identification', $aso_connexion);
    }
}
?>