[sork] passwd and confixx

RDG GmbH Webservices webservices at rdg-gmbh.de
Fri Sep 3 02:54:49 PDT 2004


Hello List!

I am using the passwd module and it is running fine changing passwords just
as I wanted it to do.

But my problem is, that I am using confixx as well on my server. Confixx is
keeping it's information about pop3 passwords and users in a mysql table.
Now everytime I create a new email account with confixx, all other passwords
from all accounts get set back to what is stored in this mysql table.

Now the solutions seems easy: Adjust the passwd code and insert a sql query
that updates the confixx table with the new password entered in the passwd
module.

The problem is I don't know where to put this query, because passwords need
to be stored encrypted in the table and I only want to alter the table if
the password has succesfully been changed by passwd!

Here's what I tried in main.php:

$cryptpw = $daemon->encryptPassword($newpassword0);
        if (!PEAR::isError($res)) {
                function db_query($query)
                {
                        $dblink = mysql_connect("localhost", "confixx",
"password") or die("Failure connecting with the database server!");
                        mysql_select_db("confixx") or die("Failure selecting
the database!");
                        $res_ident = mysql_query($query) or die("Failure in
your database query: ".mysql_error());
                        return $res_ident;
                }
                $query = "UPDATE pop3 SET longpw = '$cryptpw' WHERE account
= '$userid'";
                $result = db_query($query);
                Horde::raiseMessage(_("Password changed!"), HORDE_SUCCESS);
        } else {
            Horde::raiseMessage( _("Failure in changing password : ") .
                    $res->getMessage(), HORDE_ERROR);
        }

but if I echo $cryptpw it is 'Object' !??


Thanks for any help!

Markus




More information about the sork mailing list