#8554: installer doesn't check DB problems when creating admin user
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 30 May 2008 08:33:27 +0000 (08:33 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 30 May 2008 08:33:27 +0000 (08:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3739 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/mod/class.tx_install.php

index 2169dd8..71da3ca 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
 
+2008-05-30  Martin Kutschker  <masi@typo3.org>
+
+       * Fixed bug #8554: installer doesn't check DB problems when creating admin user
+
 2008-05-29  Martin Kutschker  <masi@typo3.org>
 
        * Fixed bug #8270: hardcoded labels in title attributes of icons in top bar of BE interface (thanx to Stefano Kowalko)
index 54a1fa4..ad2dc42 100755 (executable)
@@ -3800,14 +3800,20 @@ From sub-directory:
                                                                                'crdate' => time()
                                                                        );
 
-                                                                       $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
+                                                                       $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
 
                                                                        $this->isBasicComplete($headCode);
 
-                                                                       $this->message($headCode,'User created','
-                                                                       Username: <strong>'.htmlspecialchars($username).'</strong><br />
-                                                                       Password: <strong>'.htmlspecialchars($pass).'</strong><br />'
-                                                                       ,1,1);
+                                                                       if ($result) {                                  
+                                                                               $this->message($headCode,'User created','
+                                                                                       Username: <strong>'.htmlspecialchars($username).'</strong><br />
+                                                                                       Password: <strong>'.htmlspecialchars($pass).'</strong><br />',
+                                                                                       1,1);
+                                                                       } else {
+                                                                               $this->message($headCode,'User not created','
+                                                                                       Error: <strong>'.htmlspecialchars($GLOBALS['TYPO3_DB']->sql_error()).'</strong><br />',
+                                                                                       3,1);
+                                                                       }
                                                                } else {
                                                                        $this->message($headCode,'Username not unique!','
                                                                        The username, <strong>'.htmlspecialchars($username).'</strong>, was not unique.',2,1);