Integration hooks recieve parameters from SMF flow

Started by RobertJ2, May 11, 2016, 05:38:43 AM

Previous topic - Next topic

RobertJ2

I'm hooking into validate_login,

add_integration_function('integrate_validate_login', 'validate_login_function', true);

What I'm trying to do is authenticate my user with a 3rd party endpoint of mine - and if it returns 200 OK - proceed to login if user exists in SMF, if user does not exist - i will create it with a call to registerMember in Subs.php.

if i'd explain with pseudocode:

if(my endpoint approves user) {
    if(user exists in SMF)
    proceed to login.
else
    create the user and then proceed to login.
}
else {
    fail the login.
}


My problem is:

How can I access the username/email & password parameters inside my validate_login_function in order to send them to my endpoint for authentication ?
Can integration hook functions recieve parameters from SMF flow ?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: