I am starting with the Zend Framework and I want to use Zend_Auth_Adapter_DbTable to authenticate my users ...
I saw the documents, which looks quite straight forward, but I am getting an error.
Here is my code snippet:
$ adapter = new Zend_Auth_Adapter_DbTable ($ this-> _dbAdapter, 'user', 'username', 'password', 'MD5 (?)'); I have a 'User' table with the 'Username' and 'Password' column, but every time I run $ result = $ adapter- & gt; Certified ();
I get an application error:
Message: The parameter given for Zend_Auth_Adapter_DbTable failed to create a valid SQL statement, please validate Check the table and column names for
Can anyone help me with this? I just want a basic authentication (password is encrypted using MD5)
The strange thing is that the following tasks ...
$ adapter = new Zend_auth_adapter_DbTable ($ this -> _dbAdapter); $ Adapter-> Settnet name ('user') - & gt; SetIntiTy column ('username)' - set credential column ('password') - & gt; Set IDTT ($ username) - & gt; Set credentials (MD5 ($ password));
But why the method fails (or use it as the first code snippet) "set credential treatment" ...
That's because I have sqlite3 and my sql
Thanks
It looks like SQLite MD5 () < You need Tcllib and Trf to use / code>.
No comments:
Post a Comment