Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Zend Framework 1.8 tutorial 4 zend_auth and zend_form part 3

Loading...

Sign in or sign up now!
15,644
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 27, 2009

Learn to have zend_auth authenticate against user information located in a database and then store the aquired user data in a percistent storage (session) to be available to the rest of the application.

Also learn the basics of creating a form using zend_form.

Part 4: http://www.youtube.com/watch?v=ZJ7f9ZOKNYs
===================
Please excuse the video quality as I am trying to find out how to screencap and encode in the way that youtube publishes all my videos in HD.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (integral30)

  • Ok Solution for

    Fatal error: Class 'Form_LoginForm' not found in Z:\PHP\xampp\xampp\htdocs\zend­­framework\Test\application\co­n­trollers\AuthenticationContr­ol­ler.php

    Please check ur folder is named as 'forms' instead of form in application directory.

  • @07105006 that can be so many things... for starters check your namespace. Check either your bootstrap or config.ini or directive appnamespace = ""

  • why do you pass a boolean to setRequired once and once not?

  • To illustrate how zend validator works; in this example what happens if user does not enter a value in the field that is set to setRequired.

  • Erm but the result of

    setRequired() and setRequired(true) in this clip is the same, isn't it? is there a difference?

  • Oh so thats what you ment, Sorry.

    Yes, there is no difference. The default parameter for setRequired is always true so setRequired() and setRequried(true) is the same. setRequired(false) would then be equivalent of not having setRequired at all.

    I should have been consistent to avoid confusion.

see all

All Comments (21)

Sign In or Sign Up now to post a comment!
  • I love these tutorials and you explain them very well :)

  • Wouldn't it be a better practice to write the AuthInstance as follows:

    $auth = Zend_Auth::getInstance(); if($auth->hasIdentity()) { // redirect } // show form / check form submission

    It make the code cleaner and more readable. While you are technically correct, Zend_Auth will only be referenced once, wouldn't it be better practice to only put one reference to it?

  • Great tutorial - thanks.

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more