Use CAKEPHP session to autologin a member into SMF

342 Views Asked by At

I have website built in CakePHP and am using SMF forum. When a user gets registered on the website, a record is inserted into the smf_members table and this user is able to login to the forum. This part works well.

I want the user to auto login to forum when user login into the website. I have searched on google and did not find anything useful.

How do I make user auto login to SMF? Any help would be appreciated!

1

There are 1 best solutions below

0
On
  1. You have to register a user before logging in. This registration will be in the {db_prefix}_members table.

  2. after you can call login api with this Ajax url: "http://your-domainname.com/index.php?action=login2"

  3. this login2() method will call in Source/LogInOut.php file and login user will redirect to SMF forum page.

and most importent:

comment // checkSession('post'); this function. if you are using smf 2.0.14 version.