Topic: Password change of another company from default Company not into db

When we login as admin into the default company and attempt to go to Setup -> Create/Update companies and choose to edit one of the non-default companies and we attempt to change that company's Administrative Password, the new password does not enter that company's database. The status of such a submission however states that the change has been successful even though it is not.

However, when we login to a specific company as admin and attempt to change the admin user's password, we are able to do so.

Re: Password change of another company from default Company not into db

As the admpassword form field is to be posted in another company's database, the following code needs to be appended around the end of the if statement in line 141 or so in admin/create_coy.php file:

    } else {
        if ($_GET['c'] = 'u') {
            $conn = $db_connections[$id];
            if (($db = db_create_db($conn)) == 0)
            {
                display_error(_("Error connecting to Database: ") . $conn['dbname'] . _(", Please correct it"));
                $error = true;
            } else {
                db_query("UPDATE ".$conn['tbpref']."users set password = '".md5($_POST['admpassword']). "' WHERE user_id = 'admin'");
            }
        }
    }

The function db_create_db() creates a new db only if it does not exist, else merely connects to it.

Attached is the corrected file.

Re: Password change of another company from default Company not into db

This feature update has been merged into the FA trunk today. The version number for the admin/create_coy.php is 1.13 now. Thanks Joe.