X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fuser.phh;h=f31d78b2bba0291d70378937de62bb7298a46802;hb=3dc6d58fd477565017745b33c752232166a0b508;hp=f3886038d8cbfde0de900959a7cdcea051c3d7a4;hpb=e968a160b612abc48f7e0ab29210ef2e6c906606;p=brisk.git diff --git a/web/Obj/user.phh b/web/Obj/user.phh index f388603..f31d78b 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -135,7 +135,7 @@ class User { function User() { } - function create(&$room, $idx, $name, $sess, $stat = "", $subst = "", $table = -1, $ip="0.0.0.0") { + static function create(&$room, $idx, $name, $sess, $stat = "", $subst = "", $table = -1, $ip="0.0.0.0") { if (($thiz = new User()) == FALSE) return (FALSE); @@ -237,7 +237,7 @@ class User { } - function myclone($from) + static function myclone($from) { if (($thiz = new User()) == FALSE) return (FALSE); @@ -247,7 +247,7 @@ class User { return ($thiz); } - function spawn($from, $table, $table_pos) + static function spawn($from, $table, $table_pos) { if (($thiz = new User()) == FALSE) return (FALSE); @@ -299,6 +299,20 @@ class User { return ($thiz); } + function flags_set($flags, $mask) + { + $flags_old = $this->flags & (~$mask); + $this->flags = ($flags_old | ($flags & $mask)); + } + + function store_set() + { + if (($bdb = BriskDB::create()) == FALSE) { + return FALSE; + } + return ($bdb->user_update_flags($this->code, ($this->flags & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)))); + } + function rd_data_set($curtime, $transp, $enc, $stat, $subst, $step, $from) { $this->rd_endtime = $curtime + RD_ENDTIME_DELTA;