[sam] Bug in sam - saving to userprefs ...

Marc G. Fournier scrappy at hub.org
Tue May 31 10:26:57 PDT 2005


May 31 17:11:39 wm HORDE[78404]: [sam] DB Error: constraint violation: INSERT INTO userpref (username, preference, value) VALUES ('junk', 'required_hits', '5') [nativecode=ERROR:  duplicate key violates unique constraint "userpref_pkey"] [on line 276 of "/usr/local/www/webmail/sam/lib/Driver/spamd_sql.php"]

Horde on our servers is setup so that username is junk at domain, not just 
junk, and everything else in horde is saving things right ... ie:

centraldb=# select * from horde_prefs where pref_name = 'display_tasklists' and pref_uid ~* 'scrappy';
         pref_uid        | pref_scope |     pref_name     |                pref_value 
------------------------+------------+-------------------+------------------------------------------
  scrappy at hub.org        | nag        | display_tasklists | a:1:{i:0;s:15:"scrappy at hub.org";}
  scrappy at postgresql.org | nag        | display_tasklists | a:1:{i:0;s:22:"scrappy at postgresql.org";}
(2 rows)

I know why the CONSTRAINT error is happening, but saved as just userid 
instead of userid at domain means that the rules themselves aren't applied 
anywhere anyway ...



----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy at hub.org           Yahoo!: yscrappy              ICQ: 7615664


More information about the sam mailing list