We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problem (need how-to) "member_member_login_start"

Development and Programming

Deep Arora's avatar
Deep Arora
153 posts
15 years ago
Deep Arora's avatar Deep Arora

I’m trying to write an extension so as to validate user against an external database, but I’m stuck. Here’s the code:

function member_member_login_start() //This function is called on event "member_member_login_start"
    {
                // QUERY FOR VALIDATING THE USER
                // USER IS VALIDATED FROM EXT DB SUCCESSFULLY

        if ($user_info['authenticated'])
        {
                        echo "auhtneicated";
                        print_r($this->EE->session->userdata);
                        exit;
                        
        }
        else
        {
                        exit('User authentication failed.');
        }
                
    }

So my questions are:

  1. Even though I get a message user is authenticated successfully (EE message), the user details are not set in the EE session. When I print the user session array, it shows empty member_id and other fields. Do I need to set user data in session in my code?

  2. How can I display the “authentication failed” message in the regular EE message box that comes if I enter wrong login details in normal scenario?

  3. Where & how to use $EXT->end_script = TRUE; I saw it in docs but couldn’t understand how it is used?

Moved to Development and Programming by Moderator

       
giusi's avatar
giusi
94 posts
15 years ago
giusi's avatar giusi

Hi,

the CodeShare Corner forum is a better place to ask about that : )

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker

Or actually the Developer Forum would be a better choice. Moving to the Developer Forum.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.