Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6775753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:56:40+00:00 2026-05-26T15:56:40+00:00

I have been creating user login form using the various groupcodes, the user login

  • 0

I have been creating user login form using the various groupcodes, the user login has to work based on the unique groupcodes.Let me explain these in detail there are two users called (X and Y) exists in the site with the following details

X  loginname-testuser@gmail.com pwd- 123456 ,groupcode-TESTCODE
Y  loginname-testuser@gmail.com pwd-test124, groupcode-TESTCODE2    

My Authcontroller

$adapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter(),
                                        'users',
                                        'login',
                                        'password',
                                        'MD5(?)','groupcode','TESTCODE');

$adapter->setIdentity($form->getValue('username'))
                     ->setCredential($form->getValue('password'));  

$result = Zend_Auth::getInstance()->authenticate($adapter); 

The result alwyas through the Authentication went Wrong error messsage. The default authcontroller takes the idenfity from the both the user rows, it doesn’t takes from the user unique row value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:56:41+00:00Added an answer on May 26, 2026 at 3:56 pm

    I’m not sure I completely understand the problem, but hopefully one of these solutions can help you.

    First, you are passing 7 arguments to the Zend_Auth_Adapter_DbTable constructor, but its constructor only accepts 5 arguments, so groupcode and testcode have no effect in your code.

    Since you are probably going to get more than 1 result, setting ambiguity identity flag may work for you. Set it by calling $adapter->setAmbiguityIdentity(true); so that if more than 1 result is returned, it will look at each one for a password match.

    If you need to pass groupcode and testcode, then you probably need to create your own auth adapter. You could extend from Zend_Auth_Adapter_DbTable to take advantage of what it has already done, but override authenticate() so that it takes your groups into consideration.

    Or, you could use Zend_Auth to check for an identity, but not use its authenticate method at all, and just write your own class to validate the user login, and then use Zend_Auth to set the identity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading that creating dependencies by using static classes/singletons in code, is
I have been creating a website with Ruby on Rails, and will be hosting
I have been creating Unit tests like crazy and find that I'm often having
I have been creating a peer to peer connection for a new game, that
I have been creating an image gallery with jQuery, all is done. The images
So far I have been creating Web Portal but recently I had a request
I have been tasked with creating a program that will generate an amortization schedule.
I have been tasked with creating a program what will create take files in
I have been tasked with creating a reusable process for our Finance Dept to
I have been successful with creating a Telerik grid to display a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.