I can't get my login form working in pimcore
Posts: I can't seem to get my auth controller working. I'm not sure what I am doing wrong.
Basically I'm implementing zend_auth and using a pimcore object开发者_开发知识库 adapter that I found on this forum (http://pastebin.com/wzEPE1yk)
You can preview my code here: http://pastebin.com/87DCqtz2
I've created a class called "users" with the fields o_key and password. I have then created two instances of the class, one is called user_brendan and the other is user_jason. I have populated the o_key and password, and when I attempt to login with the form using user:user_brendan, pass:888 it seems to work fine, but when i try anything else it just reloads the form. It won't even echo out my echo statements as shown in the paste bin.
Can someone please explain?
Here is the code from my view file:
<?php $this->template('includes/head.php'); ?>
<?php $this->headTitle('Login'); ?>
<h1>Login</h1>
<?php echo $this->form->setAction('/login'); ?>
<?php $this->template('includes/footer.php'); ?>
Thanks so much
PS: Cross posted this to the pimcore forum here: if you see the answer, copy it over and i'll mark you as the answerer http://www.pimcore.org/forum/discussion/555/i-cant-get-my-login-form-working-please-help
The field 'o_key' is the key of the object used by pimcore internally (hence the o_-prefix), it's the name you enter when creating the object. Also make sure your objects are stored in the folder named 'users' (or create the Website_Auth_ObjectAdapter-class without the 4th argument).
Try debugging the $result variable in your _process() method
(the answer on the Pimcore site is from my colleague :))
I found this tutorial
http://weierophinney.net/matthew/archives/165-Login-and-Authentication-with-Zend-Framework.html
Has anyone realised that the pimcore support isn't very good? Luckily, Zend support is excellent and there are plenty of resources out there.
精彩评论