<?php
/***************************************************************************
- * Copyright (C) 2003-2010 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
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 homonyms (homonyme_id, uid) 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;