$ws2ext = array();\r
while ($r->fetch()) {\r
// On s'occupe de l'entreprise\r
+ if (trim($r->rs) == '') {\r
+ $r->rs = trim($r->prenom . ' ' . $r->nom);\r
+ }\r
$nom = mb_strtolower(trim($r->rs));\r
+\r
$nom = cubeText::str2URL($nom);\r
$email = trim(mb_strtolower($r->email));\r
if (isset($entreprises[$nom])) {\r
$ws2ext[$r->admin] = 5;\r
}\r
$c = $core->con->openCursor('entreprises');\r
- $c->ws_admin = $utilisateurs_entreprises[$ws2ext[$r->admin]];\r
- $c->update('WHERE entreprise_id=\'' . $ws2ext[$r->uid] . '\'');\r
+ $c->ws_admin = $ws2ext[$r->admin];\r
+ $c->update('WHERE entreprise_id=\'' . $utilisateurs_entreprises[$ws2ext[$r->uid]] . '\'');\r
}\r
} else {\r
$ws2ext = array();\r