Create Your Own Symfony2 Password Encoder

Recommended reading: How to Fix Symfony2 Ajax Login Redirect

If you ever needed to migrate an old project’s users to Symfony2, you probably needed to preserve their passwords. As the passwords are encoded using a specific algorithm, you have to configure your new Symfony2 project to use exactly the same method in order for the old passwords work.

Find out how to do this in this new blog post: How to Create a Custom Symfony2 Password Encoder

Android Tutorial: How to Build a Login Screen

Recommended reading: Symfony2 Doctrine Migrations with Unique Indexes (Slugs)

My first Android tutorial is live here:

You will find a full code example on how to build an Android login screen using an API web service to check the username and password before allowing users to access some part of your applications. Please enjoy and let us know in the comments if you have any suggestions to improve this.

How to Get the Corresponding Label of a Form Field in Twig (Symfony2)

Recommended reading: Symfony2 Doctrine Migrations with Unique Indexes (Slugs)

When you need to render the label value for a specific field without rendering the entire HTML label element (e. g. to use it for a placeholder) do it by using the label form variable like described here: Symfony2: How to Get the Label for a Specific Form Field in Twig.