+ function is_appr()
+ {
+ return ($this->flags & USER_FLAG_TY_APPR);
+ }
+
+ function is_auth()
+ {
+ return ($this->flags & USER_FLAG_AUTH);
+ }
+
+ function is_cert()
+ {
+ return (($this->flags & USER_FLAG_AUTH) && ($this->flags & USER_FLAG_TY_CERT));
+ }
+
+ function is_empty()
+ {
+ return ($this->sess == "");
+ }
+
+ function is_active()
+ {
+ if ($this->sess != "" && !$this->the_end) // OK: is_active()
+ return TRUE;
+ return FALSE;
+ }
+
+ function flags_db_get($mask)
+ {
+ return ($this->flags_db & $mask);
+ }
+
+ function flags_db_set($flags_db, $mask)
+ {
+ $flags_db_old = $this->flags_db & (~$mask);
+ $this->flags_db = ($flags_db_old | ($flags_db & $mask));
+
+ return ($flags_db_old);
+ }
+
+ function flags_get($mask)
+ {
+ return ($this->flags & $mask);
+ }
+
+ function flags_set($flags, $mask)
+ {
+ $flags_old = $this->flags & (~$mask);
+ $this->flags = ($flags_old | ($flags & $mask));
+
+ return ($flags_old);
+ }
+
+ function prefs_store()
+ {
+ if (($bdb = BriskDB::create()) == FALSE) {
+ return FALSE;
+ }
+ if ($this->flags_db == $this->flags)
+ return TRUE;
+
+ $this->flags_db = $this->flags;
+ return ($bdb->user_prefs_update($this->code, ($this->flags_db & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
+ $this->rec->supp_comp_get()));
+ }
+
+ function tos_store()
+ {
+ if (($bdb = BriskDB::create()) == FALSE) {
+ return FALSE;
+ }
+ return ($bdb->user_tos_update($this->code, $this->rec->tos_vers_get()));
+ }
+
+ function state_store()
+ {
+ if (($bdb = BriskDB::create()) == FALSE) {
+ return FALSE;
+ }
+ $this->flags_db = $this->flags;
+ return ($bdb->user_state_update($this->code, ($this->flags_db & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
+ $this->rec->disa_reas_get()));
+ }
+
+ function rd_data_set($curtime, $transp, $enc, $stat, $subst, $step, $from)