Added: 2 years ago
From: integral30
Views: 15,600
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
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.

  • Comment removed

  • Comment removed

  • Comment removed

  • 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 = ""

  • Comment removed

  • Zend_Controller_Front::getInst­ance()->getBaseUrl() returns to nothing. How can I fix it.

    Im using Ubuntu 10.04 and ZF 1.10

  • Can you write an update for

    $identity = $authAdapter->getResultRowObje­ct();

    $authStorage = $auth->getStorage();

    $authStorage->write($identity)­;

    for 1.10 because it login but it don't save sassion

  • my form didn't appear either...

    and i have the code in bootstrap ..

    What can it be?

  • Sorry! My mistake

    Excelent tutorials! Thank you!

  • Some how my application cant seem to find the form. it simply returns me the error:

    Fatal error: Class 'Form_LoginForm' not found in Z:\PHP\xampp\xampp\htdocs\zend­framework\Test\application\con­trollers\AuthenticationControl­ler.php on line 18

  • I've been following this, but for some reason my form will not appear.

  • is because in the video he never talk about Bootstrap.php just add code below and put an invalid password in your controller: protected function _initAutoload() { $moduleLoader = new Zend_Application_Module_Autolo­ader(array(  'namespace' => '', 'basePath' => APPLICATION_PATH)); return $moduleLoader; }

  • @medthompson thanks, it works now :)

  • 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.

  • Thanks for clearing that up for me in a fast reply :)

    And many thanks for the tutorials, they're awesome!

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