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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:52:00+00:00 2026-06-09T17:52:00+00:00

I am using the last version of CakePhp. I developed a simple web form

  • 0

I am using the last version of CakePhp.

I developed a simple web form with email and password(i am using email instead of username).

Now i have the follow problem.

I have encrypted email field in the database, so, for this reason, i can not use auth Component as is because it will check plan email and hashed password. I need encrypted email and hashed Password.

So Now, before login() how can i change the value of the email field?

Thank you

  • 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-09T17:52:01+00:00Added an answer on June 9, 2026 at 5:52 pm

    The AuthComponent is still suitable in your situation.

    If you include the component specifying that the email address is also the ‘username’

    public $components = array(
        'Auth' => array(
            'authenticate' => array(
                'Form' => array(
                    'fields' => array('username' => 'email')
                )
            )
         )
    );
    

    And then just encrypt the email address before you call the login method.

     $this->request->data['User']['email'] = someEncryption($this->request->data['User']['email']);
     $this->Auth->login();
    

    Hope this helps

    More Info:
    http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#creating-custom-authentication-objects

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

Sidebar

Related Questions

I'm using the last version of Smarty, I'm tring to register a block but
I am using old good RichEdit control with last version of VB.NET I want
I am very new to nservicebus. I am using version 3.0.1, the last one
1) I started using hive from last 2 months. I have a same task
Using the last version of the tweetsharp library for the twitter api, i am
I'm using CakePHP to send an email. My controller code looks like: if ($this->User->save($this->request->data))
I have a little issue with upgrading my sqlite database. For now I'm using
I'm using the last version of Ubuntu which come with the gcc 4.4.5 version.
I'm using the Django Registration class, it's great, but the last version shipped with
I'm using the last version of fullcalendar , I looked on documentation how change

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.