* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: user.func.inc.php,v 1.3 2004-11-18 15:35:36 x2000habouzit Exp $
+ $Id: user.func.inc.php,v 1.4 2004-11-18 17:39:10 x2000habouzit Exp $
***************************************************************************/
* we still keep his birthdate, adresses, and personnal stuff
* kills the entreprises, mentor, emails and lists subscription stuff
*/
-function user_clear_all_subs($user_id, $del_emails=true) {
+function user_clear_all_subs($user_id, $really_del=true) {
// keep datas in : aliases, adresses, applis_ins, binets_ins, contacts, groupesx_ins, homonymes, identification_ax, photo
// delete in : auth_user_md5, auth_user_quick, competences_ins, emails, entreprises, langues_ins, mentor,
// mentor_pays, mentor_secteurs, newsletter_ins, perte_pass, requests, user_changes, virtual_redirect, watch_sub
$res = $globals->db->query("select alias from aliases where type='a_vie' AND id=$uid");
list($alias) = mysql_fetch_row($res);
mysql_free_result($res);
- if($del_emails) $globals->db->query("delete from emails where uid=$uid");
+
+ if($really_del) {
+ $globals->db->query("delete from emails where uid=$uid");
+ $globals->db->query("delete from newsletter_ins where user_id=$uid");
+ }
$globals->db->query("delete from virtual_redirect where redirect ='$alias@m4x.org'");
$globals->db->query("delete from virtual_redirect where redirect ='$alias@polytechnique.org'");
$globals->db->query("delete from mentor_pays where uid=$user_id");
$globals->db->query("delete from mentor_secteur where uid=$user_id");
$globals->db->query("delete from mentor where uid=$user_id");
- $globals->db->query("delete from newsletter_ins where user_id=$uid");
$globals->db->query("delete from perte_pass where uid=$uid");
$globals->db->query("delete from requests where user_id=$uid");
$globals->db->query("delete from user_changes where user_id=$uid");
require_once('xml-rpc-client.inc.php');
$client = new xmlrpc_client("http://{$_SESSION['uid']}:{$_SESSION['password']}@localhost:4949/polytechnique.org");
- $client->kill($alias);
+ $client->kill($alias, $really_del);
}
/** inscrit l'uid donnée au forum promo
#* Foundation, Inc., *
#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
#***************************************************************************
-# $Id: mailman-rpc.py,v 1.80 2004-11-18 14:16:44 x2000habouzit Exp $
+# $Id: mailman-rpc.py,v 1.81 2004-11-18 17:39:11 x2000habouzit Exp $
#***************************************************************************
import base64, MySQLdb, os, getopt, sys, MySQLdb.converters, sha, signal
return 0
return 1
-def kill(userdesc,perms,vhost,alias):
+def kill(userdesc,perms,vhost,alias,del_from_promo):
+ exclude = []
+ if not del_from_promo:
+ exclude.append('polytechnique.org'+VHOST_SEP+'promo'+alias[-4:])
for list in Utils.list_names():
+ if list in exclude: continue
try:
mlist = MailList.MailList(list,lock=0)
except:
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: utilisateurs.tpl,v 1.22 2004-11-18 13:45:49 x2000habouzit Exp $
+ $Id: utilisateurs.tpl,v 1.23 2004-11-18 17:39:11 x2000habouzit Exp $
***************************************************************************}
</tr>
</table>
</form>
-
+<p>
+Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
+Pour ceci changer ses permissions en 'disabled'.
+</p>
<form id="alias" method="post" action="{$smarty.server.PHP_SELF}">
<table class="tinybicol" cellpadding="2" cellspacing="0">
<tr>