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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:27:08+00:00 2026-05-21T05:27:08+00:00

I’m trying to find a way to log in user without password. The reason

  • 0

I’m trying to find a way to log in user without password.

The reason is that I have phpBB3 forums in my site and the users already log in there. So I’m now building an expansion to the site to have more than just the forum (Using CakePHP). I thought that I could attach automatic account creation to CakePHP when user creates an account to forums (And ofcourse other link for the existing users). So the users would get CakePHP account that has the same username that they have registered in forums. That means that the only way to register to CakePHP part of the site would be to register to the forums first.

Now I’d like to handle the whole logging thing by phpBB3 login so users would still login to forums, and then I’d attach a piece of code that would also login them to CakePHP part of the site with the username they used to login to forums.

This way I could do also put users to their own ACL groups by their status in forums.

Thats what I’m after and I need to know the way to login users this way. I’m not looking for complete code I’m just looking for an answer that explains how I log in users in CakePHP without them having passwords at all.

I have also looked http://bakery.cakephp.org/articles/wilsonsheldon/2009/01/13/phpbb3-api-bridge but it just doesn’t quite look what I’m looking for…

  • 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-21T05:27:09+00:00Added an answer on May 21, 2026 at 5:27 am

    As far as I recall, Auth requires two pieces of info for a login.
    You can change which fields in the users table are checked by auth with.

    $Auth->fields = array(
        'username' => 'username',
        'password' => 'password'
    );
    

    So if you you want to be able to log in users according to their nickname and shoesize:

    $Auth->fields = array(
        'username' => 'nickname',
        'password' => 'shoesize'
    );
    

    IMPORTANT:
    The AuthComponent expects the password value stored in the database to be hashed instead of being stored in plaintext.

    (I think it is a sha1 of the password and Security.salt)

    In the above example, if any entries already existed in the database you’d have to overwrite the shoesize field for each of them with hashed versions of the shoesizes.

    To generate a hashed password yourself you can use $Auth->password('A Password');


    Quick and Dirty

    If you fill the password fields in your users table with the return value of:
    $Auth->password(null);

    Then you can use the following:

    $Auth->login(
        array(
            'User'=>array(
                'username'=> USERNAME_FROM_PHPBB3,
                'password'=>null
            )
        )
    );
    

    Less Quick and Dirty


    When creating a new user.
    Set the password field to the md5 hash of some random input.

    $this->authUser[$this->User->alias][$Auth->fields['password']] = $Auth->password(md5(rand().rand()));
    

    Use the Username from phpBB3 to retrieve the relevant record
    from the users table in the database.

    $this->authUser = $this->User->findByUsername( USERNAME_FROM_PHPBB3 );
    

    If the query was successful Log in the user

    if($this->authUser){
        if($Auth->login($this->authUser)){
            // Login Successful
        }
    }
    

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.