<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
}
$res = XDB::query("SELECT alias
FROM aliases
- WHERE id = {?} AND type = 'alias' AND FIND_IN_SET('usage', flags)",
+ WHERE uid = {?} AND type = 'alias' AND FIND_IN_SET('usage', flags)",
$this->user->id());
$this->old_alias = $res->fetchOneCell();
if ($this->old_alias != $this->new_alias) {
- $res = XDB::query("SELECT id
+ $res = XDB::query("SELECT uid
FROM aliases
WHERE alias = {?}",
$this->new_alias);
public function commit()
{
- require_once 'notifs.inc.php';
require_once 'name.func.inc.php';
- register_watch_op($this->user->id(), WATCH_FICHE, '', 'search_names');
set_profile_display($this->display_names);
set_alias_names($this->sn_new, $this->sn_old, true, $this->new_alias);