Ip de l'utilisateur
This commit is contained in:
parent
defb12cad9
commit
62e01c3ab0
@ -131,6 +131,17 @@ class Utilisateur
|
||||
return $this->identity->nbRep;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne l'adresse Ip de l'utilisateur
|
||||
*/
|
||||
public function getIpAdress()
|
||||
{
|
||||
if ( !isset($this->identity->ip) || empty($this->identity->ip) ){
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
return $this->identity->ip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérifie que l'utiliasteur a le mode edition
|
||||
* @return boolean
|
||||
|
Loading…
Reference in New Issue
Block a user