- $page->assign('path', 'marketing/private/'.$uid);
-
- $res = XDB::query("SELECT nom, prenom, promo, matricule
- FROM auth_user_md5
- WHERE user_id={?} AND perms='pending'", $uid);
-
- if (list($nom, $prenom, $promo, $matricule) = $res->fetchOneRow()) {
- require_once('user.func.inc.php');
- $matricule_X = get_X_mat($matricule);
- $page->assign('nom', $nom);
- $page->assign('prenom', $prenom);
- $page->assign('promo', $promo);
- $page->assign('matricule', $matricule);
- $page->assign('matricule_X',$matricule_X);
- } else {
- $page->kill('uid invalide');
+ // Retrieves marketed user details.
+ $res = XDB::query(
+ "SELECT matricule
+ FROM auth_user_md5
+ WHERE user_id = {?} AND perms = 'pending'", $user->id());
+ if (!($matricule = $res->fetchOneCell())) {
+ $page->kill("Cet utilisateur est déjà inscrit au site.");