X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fuser.phh;h=69842e8bc460a6bb2c020672218930f7afa7253c;hb=59ef2095b7a6fb0b57302ceb84830c81794e94a5;hp=a7d9357d0995d360f7432c3eaf1fedd62f44b11b;hpb=7408b42dfc2a340ab4830113b23ce8cf87a131c8;p=brisk.git diff --git a/web/Obj/user.phh b/web/Obj/user.phh index a7d9357..69842e8 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -63,6 +63,7 @@ define('USER_FLAG_TY_FIRONLY', 0x200000); // done define('USER_FLAG_TY_SUSPEND', 0x400000); // done define('USER_FLAG_TY_DISABLE', 0x800000); // done +// ... reasons for disabling account ... define('USER_DIS_REA_INVMAIL', 1); define('USER_DIS_REA_LICENCE', 2); define('USER_DIS_REA_BANNED', 3); @@ -314,6 +315,8 @@ class User { { $flags_old = $this->flags & (~$mask); $this->flags = ($flags_old | ($flags & $mask)); + + return ($flags_old); } function prefs_store() @@ -333,6 +336,15 @@ class User { return ($bdb->user_licence_update($this->code, $this->rec->lice_vers_get())); } + function state_store() + { + if (($bdb = BriskDB::create()) == FALSE) { + return FALSE; + } + return ($bdb->user_state_update($this->code, ($this->flags & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)), + $this->rec->disa_reas_get())); + } + function rd_data_set($curtime, $transp, $enc, $stat, $subst, $step, $from) { $this->rd_endtime = $curtime + RD_ENDTIME_DELTA;