Beispiel #1
0
 public function testIuserIsInvalid()
 {
     $post_variables = $this->post_variables;
     $post_variables['iuser'] = '******';
     $installer = new Installer($post_variables, $this->manualPath);
     $this->assertEquals(FALSE, $installer->iuser_is_valid());
 }
Beispiel #2
0
     }
     echo "<TR VALIGN='TOP' class='noclone'><TD COLSPAN=2><font color='red'>OPENEMR USER:</font></TD></TR>";
     echo "<TR VALIGN='TOP' class='noclone'><TD><span class='text'>Initial User:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='iuser' VALUE='admin'></TD><TD><span class='text'>(This is the login name of user that will be created for you. Limit this to one word.)</span></TD></TR>\n<TR VALIGN='TOP' class='noclone'><TD><span class='text'>Initial User Password:</span></TD><TD><INPUT SIZE='30' TYPE='PASSWORD' NAME='iuserpass' VALUE=''></TD><TD><span class='text'>(This is the password for the initial user account above.)</span></TD></TR>\n<TR VALIGN='TOP' class='noclone'><TD><span class='text'>Initial User's First Name:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='iufname' VALUE='Administrator'></TD><TD><span class='text'>(This is the First name of the 'initial user'.)</span></TD></TR>\n<TR VALIGN='TOP' class='noclone'><TD><span class='text'>Initial User's Last Name:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='iuname' VALUE='Administrator'></TD><TD><span class='text'>(This is the Last name of the 'initial user'.)</span></TD></TR>\n<TR VALIGN='TOP' class='noclone'><TD><span class='text'>Initial Group:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='igroup' VALUE='Default'></TD><TD><span class='text'>(This is the group that will be created for your users.  This should be the name of your practice.)</span></TD></TR>\n";
     echo "<TR VALIGN='TOP'><TD>&nbsp;</TD></TR>";
     echo "</TABLE>\n<br>\n<INPUT TYPE='SUBMIT' VALUE='Continue'><br></FORM><br>";
     break;
 case 3:
     // Form Validation
     //   (applicable if not cloning from another database)
     if (empty($installer->clone_database)) {
         if (!$installer->login_is_valid()) {
             echo "ERROR. Please pick a proper 'Login Name'.<br>\n";
             echo "Click Back in browser to re-enter.<br>\n";
             break;
         }
         if (!$installer->iuser_is_valid()) {
             echo "ERROR. The 'Initial User' field can only contain one word and no spaces.<br>\n";
             echo "Click Back in browser to re-enter.<br>\n";
             break;
         }
         if (!$installer->user_password_is_valid()) {
             echo "ERROR. Please pick a proper 'Initial User Password'.<br>\n";
             echo "Click Back in browser to re-enter.<br>\n";
             break;
         }
     }
     if (!$installer->password_is_valid()) {
         echo "ERROR. Please pick a proper 'Password'.<br>\n";
         echo "Click Back in browser to re-enter.<br>\n";
         break;
     }