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 6093457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:33:43+00:00 2026-05-23T12:33:43+00:00

Im new to Pimcore and I’m trying to use Zend Auth with pimcore objects.

  • 0

Im new to Pimcore and I’m trying to use Zend Auth with pimcore objects. I assume this is a wise approach and it seems more or less logical to me. I’ve done the initial setup of the object within pimcore itself. Now I’m trying to work out how to connect it to zend auth, that is, for example when I extend zend auth and have my own login function, how do i check if the login is valid in my object?

Does someone have a guide that I could use on this perhaps? otherwise if someone could point me in the right direction that would be great

Jason

  • 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-23T12:33:44+00:00Added an answer on May 23, 2026 at 12:33 pm

    You can follow this guide: http://www.pimcore.org/forum/discussion/419/zend_auth_adapter-for-pimcore-objects , it worked well for me.

    UPDATE: The link above has been taken away, so laying out the full answer here:

    First, you need to put ObjectAdapter.php in website/lib/Website/Auth/ObjectAdapter.php .

    Then, this is how you login your user (use as you prefer, for example in your controller init function):

    $authAdapter = new Website_Auth_ObjectAdapter('Object_Users', 'o_key', 'password', '/users/'); 
    // The parameters are 1. object you keep your users in, 2. the field that contains their username (I use o_key which is the name of the object itself, to keep unique usernames without fuzz), and 3. the password field in the user object.
    
    // Setup auth adapter
    $authAdapter->setIdentity($username)->setCredential($password); 
    
    $auth = Zend_Auth::getInstance(); 
    
    // Authenticate 
    $result = $auth->authenticate($authAdapter); 
    if ($result->isValid()) {
        // Login successful
    } else {
        // Login failed
    }
    

    To check for a login-session, use:

    $this->auth = Zend_Auth::getInstance();
    if ($this->auth->hasIdentity()) { 
        // We have a login session (user is logged in)
        $userObject = $this->auth->getIdentity();
    }   
    

    To kill a session:

    Zend_Auth::getInstance()->clearIdentity();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to javascript/jquery and having a hard time with using this or $(this) to
New to Linux programming in general. I am trying to communicate with a kernel
In new C++ code, I tend to use the C++ iostream library instead of
Being new to test based development, this question has been bugging me. How much
New here. Also I'm (very) new to python and trying to understand the following
New to php and drupal. I set up drupal and trying to customize the
new to cakePHP and trying my first join. I've got one table called users
New to the MVC.net scene (and .net for that matter), but seems I find
New to StackOverflow and new to C. I'm trying to take a struct as
I have found this example on StackOverflow: var people = new List<Person> { new

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.