source: extensions/NBC_UserAdvManager/trunk/maintain.inc.php @ 3841

Last change on this file since 3841 was 3841, checked in by Eric, 15 years ago
  • Adding management of unvalidated users according time limit
  • Adding actions : Resend validation email with new key generation (reset of time limit), send reminder mail for validation (no new key generation), delete expired unvalidated users.

Note : There is still a problem with the display of a new validation link when using function "Resend validation email with new key generation"

  • Property svn:eol-style set to LF
File size: 1.3 KB
Line 
1<?php
2
3if(!defined("NBC_UserAdvManager_PATH"))
4  define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
5
6include_once (NBC_UserAdvManager_PATH.'include/constants.php');
7
8function plugin_install()
9{
10  $q = '
11    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
12    VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;;","Parametres du plugin nbc UserAdvManager")
13  ;';
14  pwg_query($q);
15
16  $q = '
17    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
18    VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;;","Parametres nbc_UserAdvManager - ConfirmMail")
19  ;';
20  pwg_query($q);
21
22        $q = "
23    CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." (
24      id varchar(50) NOT NULL default '',
25      user_id smallint(5) NOT NULL default '0',
26      mail_address varchar(255) default NULL,
27      status enum('webmaster','admin','normal','generic','guest') default NULL,
28      date_check datetime default NULL,
29      PRIMARY KEY  (id)
30    )
31  ;";
32  pwg_query($q);
33}
34
35
36
37function plugin_uninstall()
38{
39  global $conf;
40
41  if (isset($conf['nbc_UserAdvManager']))
42  {
43    $q = '
44      DELETE FROM '.CONFIG_TABLE.'
45      WHERE param="nbc_UserAdvManager"
46    ;';
47
48    pwg_query($q);
49  }
50
51
52  $q = 'DROP TABLE '.USER_CONFIRM_MAIL_TABLE.';';
53  pwg_query( $q );
54}
55?>
Note: See TracBrowser for help on using the repository browser.