quick fix for supp_comp undefined in not registered users
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 12 Mar 2013 07:52:06 +0000 (08:52 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 12 Mar 2013 07:52:06 +0000 (08:52 +0100)
web/Obj/brisk.phh

index 53c46a7..ebe6c67 100644 (file)
@@ -727,7 +727,12 @@ class Client_prefs {
     {
         fprintf(STDERR, "QQ %s: %x\n", __FUNCTION__, $user->flags);
         $this->listen = ($user->flags & USER_FLAG_MAP_AUTH) >> 2;
     {
         fprintf(STDERR, "QQ %s: %x\n", __FUNCTION__, $user->flags);
         $this->listen = ($user->flags & USER_FLAG_MAP_AUTH) >> 2;
-        $this->supp_comp = $user->rec->supp_comp;
+        if ($user->rec != FALSE) {
+            $this->supp_comp = $user->rec->supp_comp;
+        }
+        else {
+            $this->supp_comp = "000000000000";
+        }
 
         fprintf(STDERR, "QQ %s: LISTEN: %d\n", __FUNCTION__, $this->listen);
     }
 
         fprintf(STDERR, "QQ %s: LISTEN: %d\n", __FUNCTION__, $this->listen);
     }