Skip to content

Commit

Permalink
Fonction pour récupérer toutes les infos d'un user en une fois
Browse files Browse the repository at this point in the history
Et elle vérifie si le user est logué ou non
  • Loading branch information
apuyou committed Oct 2, 2013
1 parent c80b7c1 commit f475069
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Payutc/Service/MADMIN.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,23 @@ public function setMsgPerso($msgPerso, $funID = NULL) {
public function getMsgPerso($funID) {
return $this->User->getMsgPerso($funID);
}

/**
* Check si le user est loggué
*
* @return Array $userDetails
*/
public function getUserDetails() {
if($this->User->getState() != 1) {
return array();
} else {
return array(
"firstname" => $this->getFirstname(),
"lastname" => $this->getLastname(),
"credit" => $this->getCredit()
);
}
}
}


0 comments on commit f475069

Please sign in to comment.