Skip to content

Instantly share code, notes, and snippets.

@alexandreelise
Created December 2, 2019 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alexandreelise/2fa2c5ce2a823bc2f08abbb91cd44274 to your computer and use it in GitHub Desktop.
Save alexandreelise/2fa2c5ce2a823bc2f08abbb91cd44274 to your computer and use it in GitHub Desktop.
Joomla! 3 user login programmatically using a simple php snippet
/**
* @var bool $result_login true on successful login, false otherwise
*/
$result_login = Factory::getApplication()->login(
[
'username' => 'example',
'password' => 'mysupersecretpassword'
],
[
'remember' => true,
'silent' => true
]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment