From: Matteo Nastasi (mop) Date: Wed, 27 Nov 2013 17:38:05 +0000 (+0100) Subject: disa_reas field added to users table X-Git-Tag: v4.11.0~19 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=f4178d38662a52ae2ccc8957e499621e735f4d16;p=brisk.git disa_reas field added to users table --- diff --git a/TODO.txt b/TODO.txt index e67c498..89f5a7c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -10,7 +10,7 @@ DONE . show licence ([show me later, yes, no]/[yes, no]) DONE . switch-off date . checkbox for anonimous users with message when not checked - . disable user reason field + . disable user reason integer field and remove SUSPEND state (db, php) . opt - button on when arrived to the bottom of the licence . opt - download licence . min - check licence version between config file and licence file diff --git a/sql/sql.d/062-guar-policy-expire.sql b/sql/sql.d/062-guar-policy-expire.sql index 76d568c..72a2449 100644 --- a/sql/sql.d/062-guar-policy-expire.sql +++ b/sql/sql.d/062-guar-policy-expire.sql @@ -1,3 +1,8 @@ -- add current licence version accepted by users ALTER TABLE #PFX#users DROP COLUMN lice_vers; ALTER TABLE #PFX#users ADD COLUMN lice_vers text DEFAULT ''; -- current accepted licence version + +-- add reason field for disabled users +ALTER TABLE #PFX#users DROP COLUMN disa_reas; +ALTER TABLE #PFX#users ADD COLUMN disa_reas integer DEFAULT 0; -- current disable reason + diff --git a/web/Obj/dbase_base.phh b/web/Obj/dbase_base.phh index d8bc1d7..2464f81 100644 --- a/web/Obj/dbase_base.phh +++ b/web/Obj/dbase_base.phh @@ -32,8 +32,9 @@ class LoginDBItem { var $last_dona; var $supp_comp; var $lice_vers; + var $disa_reas; - function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $lice_vers) + function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $lice_vers, $disa_reas) { $this->code = $code; $this->login = $login; @@ -43,13 +44,14 @@ class LoginDBItem { $this->last_dona = $last_dona; $this->supp_comp = $supp_comp; $this->lice_vers = $lice_vers; + $this->disa_reas = $disa_reas; } static function LoginDBItemFromRecord($rec) { $ret = new LoginDBItem($rec->code, $rec->login, $rec->pass, $rec->email, $rec->type, $rec->last_dona, - $rec->supp_comp, $ret->lice_vers); + $rec->supp_comp, $rec->lice_vers, $rec->disa_reas); return ($ret); } @@ -94,6 +96,11 @@ class LoginDBItem { return $this->lice_vers; } + function disa_reas_get() + { + return $this->disa_reas; + } + } ?> \ No newline at end of file diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 8ffeee8..80d3ce9 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -63,6 +63,10 @@ define('USER_FLAG_TY_FIRONLY', 0x200000); // done define('USER_FLAG_TY_SUSPEND', 0x400000); // done define('USER_FLAG_TY_DISABLE', 0x800000); // done +define('USER_DIS_REA_INVMAIL', 1); +define('USER_DIS_REA_LICENCE', 2); +define('USER_DIS_REA_BANNED', 3); + // 240 is the right value, 600 is for fwrite error test define('RD_ENDTIME_DELTA', 240); define('RD_KEEPALIVE_TOUT', 4);