Hello!

Todd Lyons <[email protected]> schrieb am 11.04.14 um 06:26:03 Uhr:

> >>> $rcmail_config['password_query'] = 'UPDATE mailbox, sasl SET password=%p
> >>> WHERE username=%u AND password=%o LIMIT 1';
> >>
> >> Create function/trigger
> >> http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html
> >
> > oh my god, that's to much for me.
> 
> Untested, but try making two SQL commands:
> 
> $rcmail_config['password_query'] = 'UPDATE mailbox SET password=%p
> WHERE username=%u AND password=%o LIMIT 1; UPDATE sasl SET password=%p
> WHERE username=%u AND password=%o LIMIT 1;'

Thank you, I'll try that this evening! Looks good! I tried with one
update querie over the two tables with funny results ;)

> Although I do have to ask, why do you have two tables with identical
> information?  This is the perfect case for all backend services to be
> using a common table for the user/pass with a JOIN to tie other bits
> of data together with that auth info.

Yes you are right. It is because first I put the SASL users in a
table some month ago. The dovecot useraccounts were in a plain
password file. The users complained they can not change their
password so I decided to put the users also into another table
some days ago. This is the reason for I have two tables now.

I will put them together in one. Sadly I don't know SQL very
well so I will have my fun with creating the join you mentioned.

> ...Todd

  Andreas
_______________________________________________
Roundcube Users mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/users

Reply via email to