Commit 1bec5159 authored by mbriand's avatar mbriand
Browse files

Récupération du surnom pour les fiches matatronch (affichage du surnom à la place de l'alias)

parent 604bfd19
......@@ -212,7 +212,10 @@ elseif ( $_REQUEST['module']=="entinfo" )
$std = new $class($site->db);
}
$std->load_by_id($_REQUEST['id']);
if ($class=="utilisateur")
$std->load_all_by_id($_REQUEST['id']);
else
$std->load_by_id($_REQUEST['id']);
if ( !$std->is_valid() )
{
......
......@@ -144,6 +144,21 @@ class utilisateur extends stdentity
* @return true en cas de succès, false sinon
*/
function load_by_id ( $id )
{
$req = new requete($this->db, "SELECT * FROM `utilisateurs`
WHERE `id_utilisateur` = '" . mysql_real_escape_string($id) . "'
LIMIT 1");
if ( $req->lines == 1 )
{
$this->_load($req->get_row());
return true;
}
$this->id = null;
return false;
}
function load_all_by_id ( $id )
{
$req = new requete($this->db,
"SELECT * ".
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment