Last active
December 11, 2015 09:59
-
-
Save jsolid/4583773 to your computer and use it in GitHub Desktop.
A simple hack to setup database without password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Step #4: Database | |
* The validator of this form checks database connection | |
* and creates the database if it doesn\'t exists | |
* See lib/validator/dbConnectionValidator.class.php | |
* File location: siwapp/apps/installer/modules/static/actions/actions.class.php | |
* | |
* @param $request | |
*/ | |
public function executeStep4(sfWebRequest $request) | |
{ | |
$this->form = new DatabaseConfigurationForm(); | |
if ($request->isMethod('post')) | |
{ | |
$params = $request->getParameter('db'); | |
$this->form->bind($params); | |
// CHANGE: Skip form validation to allow empty password (if you setup in XAMPP) | |
//if($this->form->isValid()) | |
//{ | |
$u = $this->getUser(); | |
$u->setAttribute('database', $params['database']); | |
$u->setAttribute('username', $params['username']); | |
$u->setAttribute('password', $params['password']); | |
$u->setAttribute('host', $params['host']); | |
$u->setAttribute('step', 5); | |
$this->redirect($this->next); | |
//} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment