Use doctrine/dbal in place of Zend_Db
This commit is contained in:
parent
22fae79a30
commit
13086b7d75
@ -63,9 +63,15 @@ class UserController extends Zend_Controller_Action
|
||||
$this->view->login = $login;
|
||||
$this->view->authorizationHeader = base64_encode($login.':'.$pass);
|
||||
|
||||
$userM = new Application_Model_Sdv1Utilisateurs();
|
||||
$sql = $userM->select()->where('id=?', $identity->id);
|
||||
$user = $userM->fetchRow($sql);
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Connection $conn
|
||||
*/
|
||||
$conn = Zend_Registry::get('doctrine');
|
||||
$userSql = "SELECT * FROM sdv1.utilisateurs WHERE id=:id";
|
||||
$stmt = $conn->prepare($userSql);
|
||||
$stmt->bindValue('id', $identity->id);
|
||||
$stmt->execute();
|
||||
$user = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||
|
||||
$this->view->IdFullName = $user->civilite . ' ' . $user->nom . ' ' . $user->prenom;
|
||||
$this->view->IdEmail = $user->email;
|
||||
@ -125,7 +131,5 @@ class UserController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
$this->view->display = $display;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user