Zend Framework Login: Protected PageTag: framework, zend, zend framework, authentication, Zend_Auth Category: PHP Frameworkpost: 22 Apr 2008 read: 1,904 Zend Framework Login System Step by Step Tutorial - Part 5: We have created authentication at previous post. Now, we try to protect a page. Thus, when not member try to enter the page, they will be redirected to login form. First, create view. Create a file named "userpage.phtml" within application/views/scripts/user. Enter following code:
Then, we add method at controller. Open "UserController.php". Add following method:
Line 2 - 6 we needed to protect page from unlogin users. Try to login. You can point your browser to http://localhost/test/zend/helloworld/web_root/user/loginform. Then login. |
| | Give Your Opinion | Recommend |
|

