<?php
/***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function UsageReq($_uid, $_usage, $_reason)
{
- global $globals;
$this->Validate($_uid, true, 'usage');
$this->nom_usage = $_usage;
$this->reason = $_reason;
$this->alias = make_username($this->prenom, $this->nom_usage);
if (!$this->nom_usage) $this->alias = "";
- $res = $globals->xdb->query("
+ $res = XDB::query("
SELECT e.alias, u.nom_usage, a.id
FROM auth_user_md5 as u
LEFT JOIN aliases as e ON(e.type='alias' AND FIND_IN_SET('usage',e.flags) AND e.id = u.user_id)
}
// }}}
- // {{{ function get_request()
-
- function get_request($uid)
- {
- return parent::get_request($uid,'usage');
- }
-
- // }}}
// {{{ function formu()
function formu()
function commit()
{
- require_once('nomusage.inc.php');
+ require_once('user.func.inc.php');
set_new_usage($this->uid, $this->nom_usage, $this->alias);
return true;
}