Roundcube Community Forum

 

Password Plugin

Started by sasi, July 28, 2010, 11:59:34 PM

Previous topic - Next topic

Schmatze

This was the first one I tried. Doesn't work either.

You can't specify target table 'virtual_users' for update in FROM clause

Thats why I tried it with a temporary table.

SKaero

Ok I think its just a mysql format problem, try this:

$rcmail_config['password_query'] = 'UPDATE `mail`.`virtual_users` SET `password` = MD5( %p ) WHERE `virtual_users`.`id` = (SELECT `id` FROM `mail`.`virtual_users` WHERE `domain_id` = (SELECT `id` FROM `mail`.`virtual_users` WHERE `name` = %d) AND `user` = %l AND `password` = MD5( %o )) LIMIT 1';

Schmatze

Ok, I made a view now with the password and the mail-address inside.

Works fine now.

Here is my query:

UPDATE `mail`.`view_users` SET `password` = MD5( %p ) WHERE `email` = %u AND `password` = MD5( %o ) LIMIT 1

Thanks for your help. ;)