X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fhomonymes.inc.php;h=684ef29db05e520054f559542231b81e3c02a3a3;hb=020a95fa78dc544b3064739d409026a0056d98f4;hp=44f0234311b42b3e0fdcb2e513046efe89c1da3f;hpb=acc9be56f2cc773f7e684f9cd3201141bc126ee2;p=platal.git diff --git a/include/validations/homonymes.inc.php b/include/validations/homonymes.inc.php index 44f0234..684ef29 100644 --- a/include/validations/homonymes.inc.php +++ b/include/validations/homonymes.inc.php @@ -1,6 +1,6 @@ user->id(), $this->loginbis); + Platal::load('admin', 'homonyms.inc.php'); + switch_bestalias($this->user, $this->loginbis); if (!$this->warning) { XDB::execute("UPDATE aliases SET type = 'homonyme', expire = NOW() WHERE alias = {?}", $this->loginbis); - XDB::execute("REPLACE INTO homonymes (homonyme_id, user_id) VALUES({?}, {?})", $this->user->id(), $this->user->id()); + XDB::execute('INSERT IGNORE INTO homonyms (homonyme_id, uid) + VALUES ({?}, {?})', + $this->user->id(), $this->user->id()); } return true;