Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 762 → Rev 763

/trunk/jrest/services/User.php
84,8 → 84,9
$admin=false;
 
session_start();
 
if (!$this->GetUser()) {
if (isset($_COOKIE["cel_name"]) && ($this->RememberedUser($_COOKIE["cel_name"], $_COOKIE["cel_password"]))) {
$retour= $this->GetUserName();
$connected=true;
104,6 → 105,7
$licence_acceptee = $this->isLicenceAccepted($retour);
 
$output = json_encode(array($retour,$connected,$admin,$licence_acceptee));
print($output);
 
}
114,10 → 116,10
$connected=false;
 
session_start();
// Non connect� : verification
// Non connecté : verification
if (isset($uid[1])) { // Identification
if (!$this->GetUser()) { // Si non identifi�
if ($this->LoginUser($uid[0],$uid[1],1)) { // identification reussi
if (!$this->GetUser()) { // Si non identifié
if ($this->LoginUser($uid[0],$uid[1],1)) { // identification reussie
$retour= $this->GetUserName();
$connected=true;
}
126,7 → 128,7
$connected=false;
}
}
else { // Deja identifi�
else { // Deja identifié
$retour= $this->GetUserName();
$connected=true;
}
153,7 → 155,6
$DB=$this->connectDB($this->config,'database_ident');
$query="SELECT ".$this->config['database_ident']['ann_id']." as name, ".$this->config['database_ident']['ann_pwd']." as password FROM ".$this->config['database_ident']['annuaire']." WHERE ".$this->config['database_ident']['ann_id']." ='".$DB->escapeSimple($name)."'";
 
 
$res =& $DB->query($query);
 
if (DB::isError($res)) {