Allow change of password without script in Create/Update Company.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 1 Mar 2010 08:49:00 +0000 (08:49 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 1 Mar 2010 08:49:00 +0000 (08:49 +0000)
CHANGELOG.txt
admin/create_coy.php

index ea70728d2c8806a0f67ee2c79c111f731afbeeff..3c5062228d642177b74335488eae9661beb37812 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+01-Mar-2010 Joe Hung
+! Allow change of password without script in Create/Update Company.
+$ /admin/create_coy.php
+
 28-Feb-2010 Joe Hunt
 # Fixed a non esisting voiding of Work Order Advanced and a couple of
   bugs in the same operation. And a fix according to Vramak on the forum.
index c3bfe489b77c80984c898f07aa5866cbe215a43c..52fd8acbd233f2ba57de2f8f7cbbbbd85e62efcf 100644 (file)
@@ -139,6 +139,17 @@ function handle_submit()
                        remove_connection($id);
                        return false;
                }
+       } 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'");
+                       }
+               }
        }
        $error = write_config_db($new);
        if ($error == -1)