Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Application_Model_Auth {
- private $authDetails = null;
- function __constructor() {
- //$this->authDetails = array_merge($this->authDetails, $authDetails);
- $this->authDetails = array('tablename' => 'customers',
- 'username' => 'name',
- 'password' => 'password',
- 'salt' => 'salt');
- }
- gives me:
- An error occurred
- Application error
- Exception information:
- Message: SQLSTATE[HY000]: General error
- Stack trace:
- #0 /Users/Pascal/pear/share/pear/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
- #1 /Users/Pascal/pear/share/pear/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
- #2 /Users/Pascal/pear/share/pear/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array)
- #3 /Users/Pascal/pear/share/pear/Zend/Db/Adapter/Abstract.php(753): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
- #4 /Users/Pascal/Sites/nlt-templater/backend/application/models/Auth.php(71): Zend_Db_Adapter_Abstract->fetchRow(Object(Zend_Db_Select))
- #5 /Users/Pascal/Sites/nlt-templater/backend/application/models/Auth.php(23): Application_Model_Auth->getSalt('estm')
- #6 /Users/Pascal/Sites/nlt-templater/backend/application/controllers/AuthController.php(36): Application_Model_Auth->isAuthorised(Object(Zend_Controller_Request_Http))
- #7 /Users/Pascal/pear/share/pear/Zend/Controller/Action.php(513): AuthController->loginAction()
- #8 /Users/Pascal/pear/share/pear/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('loginAction')
- #9 /Users/Pascal/pear/share/pear/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
- #10 /Users/Pascal/pear/share/pear/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
- #11 /Users/Pascal/pear/share/pear/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
- #12 /Users/Pascal/Sites/nlt-templater/backend/public/index.php(26): Zend_Application->run()
- #13 {main}
- Request Parameters:
- array (
- 'controller' => 'auth',
- 'action' => 'login',
- 'module' => 'default',
- 'username' => 'estm',
- 'password' => 'estm',
- 'login' => 'login',
- )
- <?php
- class Application_Model_Auth {
- private $authDetails = array('tablename' => 'customers',
- 'username' => 'name',
- 'password' => 'password',
- 'salt' => 'salt');
- function __constructor() {
- //$this->authDetails = array_merge($this->authDetails, $authDetails);
- $this->authDetails = array('tablename' => 'customers',
- 'username' => 'name',
- 'password' => 'password',
- 'salt' => 'salt');
- }
- WORKS!! i coudl also change the array in the constructor to whatever i want. it still works.
Add Comment
Please, Sign In to add comment