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

  • Home
  • SEARCH
  • 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 9103077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:32:43+00:00 2026-06-17T01:32:43+00:00

I have a symfony1 application with sfGuardUser plugin. I need to use the same

  • 0

I have a symfony1 application with sfGuardUser plugin. I need to use the same database in my new symfony2 application.

How should I define the password encoder so it match the symfony1 encoded passwords?

  • 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-06-17T01:32:44+00:00Added an answer on June 17, 2026 at 1:32 am

    If you didn’t provide a different encoding algorithm back then Symfony 1.x would use sha1($salt.$rawPassword). So your PasswordEncoder should look like this:

    use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
    
    class PasswordEncoder implements PasswordEncoderInterface
    {
        public function encodePassword($raw, $salt)
        {
            return sha1($salt.$raw);
        }
    
        public function isPasswordValid($encoded, $raw, $salt)
        {
            return $this->encodePassword($raw, $salt) === $encoded;
        }
    }
    

    Good luck!

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

Sidebar

Related Questions

I have a Symfony application which use a mysql database to store session data,
I have managed to successfully deploy my Symfony2 application to a production web server,
I have a legacy application that I would like to move over to Symfony2.
I am working on my test application in symfony2 with sqlite. I have install
I'm working on a Symfony2 application, that I use to manage my monthly budget.
I have a Symfony2 application, with a bundle that have a couple of entities
I have application in Symfony2 with 2 roles: ROLE_ADMIN and ROLE_PARTNER. Also I have
I have a Symfony2 Web application which requires user login to perform such useful
I have an application written in symfony 1.4, and I'd like to use the
Working with Symfony2.0 and jQuery, I have a web application that in certain moment

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.