Bug in sam - saving to userprefs ...

"Marc G. Fournier" <[email protected]> Tue, 31 May 2005 14:26:57 -0300 (ADT)
Newsgroups gmane.comp.horde.sam
Message-ID <[email protected]>
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@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 
------------------------+------------+-------------------+------------------------------------------
  [email protected]        | nag        | display_tasklists | a:1:{i:0;s:15:"[email protected]";}
  [email protected] | nag        | display_tasklists | a:1:{i:0;s:22:"[email protected]";}
(2 rows)

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



----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: [email protected]           Yahoo!: yscrappy              ICQ: 7615664
-- 
sam mailing list - Join the hunt: http://horde.org/bounties/#sam
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]