function user_signup($username, $password) { if ($username == "") { echo "<script>alert('please input your username'); history.go(-1);</script>"; } else { if ($password == "") { echo "<script>alert('please input your password'); history.go(-1);</script>"; } else { $result = check_username_password($username, $password, $token); if ("ok" == $result) { echo "<script language='javascript'>"; echo " location='/main/footer.php';"; echo "</script>"; } else { echo "<script>alert('{$result}'); history.go(-1);</script>"; } } } }
$data = "<li><b>Error </b>Change site administrator's username ie <b>" . $query['name'] . "</b></li>"; fwrite($GLOBALS['createdFile'], $data); } $passwords = array('admin', 'admin123', 'siteadmin', 'siteadmin123', $sitename); $passwords[] = $query['name']; $account = user_load_by_name($query['name']); foreach ($passwords as $password) { $pass = user_check_password($password, $account); if ($pass == TRUE) { $data = "<li><b>Error </b>Need to change site administrator's password immediately.</li>"; fwrite($GLOBALS['createdFile'], $data); break; } } } check_username_password(); /** * Checking permissions on files and folders. */ function check_permission() { $conf_dir = drupal_verify_install_file(conf_path(), FILE_NOT_WRITABLE, 'dir'); if (!$conf_dir) { $data = '<li>' . t('The directory %file is not protected from modifications and poses a security risk. You must change the directory\'s permissions to be non-writable. ', array('%file' => conf_path())) . '</li>'; fwrite($GLOBALS['createdFile'], $data); } $conf_file = drupal_verify_install_file(conf_path() . '/settings.php', FILE_EXIST | FILE_READABLE | FILE_NOT_WRITABLE); if (!$conf_file) { $data = '<li>' . t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() . '/settings.php')) . '</li>'; fwrite($GLOBALS['createdFile'], $data); }