[x] Modifier l'affichage du profil
This commit is contained in:
parent
5bf45d32d1
commit
b588868ed7
|
@ -40,20 +40,30 @@ require_once __ROOT__.'/manager/security.php';
|
|||
|
||||
|
||||
|
||||
/***************/
|
||||
/*** PROFILE ***/
|
||||
/***************/
|
||||
/**************/
|
||||
/*** PROFIL ***/
|
||||
/**************/
|
||||
if( connected() ){ // si l'utilisateur est connecté
|
||||
$infos = userRepo::info($_SESSION['identifiant']);
|
||||
$droits = explode(',', $infos['droits']);
|
||||
|
||||
echo "<section name='myprofile' data-title='Profil'>";
|
||||
echo '<p>';
|
||||
echo 'Nom : '.ucfirst($infos['nom']).'<br><br>';
|
||||
echo 'Prénom : '.ucfirst($infos['prenom']).'<br><br>';
|
||||
echo 'Statut : ';
|
||||
$count = 0;
|
||||
foreach ($droits as $droit) {
|
||||
echo "<span class='link'>".$droit.'</span>';
|
||||
echo '   ';
|
||||
if( $count > 0 ) echo ', ';
|
||||
|
||||
switch($droit){
|
||||
case 'admin' : echo '<span>administrateur</span>'; break;
|
||||
case 'master' : echo '<span>référent</span>'; break;
|
||||
case 'teacher': echo '<span>enseignant</span>'; break;
|
||||
case 'student': echo '<span>étudiant</span>'; break;
|
||||
default: echo '<span>inconnu</span>'; break;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
echo '<br><br>';
|
||||
echo 'Mail : '.$infos['mail'];
|
||||
|
|
Loading…
Reference in New Issue