So I'm attempting to create a small plugin/module where I can log in a user with the need to have a password, login with Facebook basically (Yes, I know there is a plugin that does all this).

I was looking at this thread -> Can't programmatically log member in

Is all that I need to do to log a person in, is to call the create_new_session() function?

I can't seem to find any decent documentation on this. Any help or references would be appreciated.

1 Answer 1


You can take a look at code how ExpressionEngine does it from the Control Panel.

See the function do_login_as_member within the file expressionengine/controllers/cp/members.php

Hope, it would help you lot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.