Skip to content

Instantly share code, notes, and snippets.

@m4tlch
Created May 26, 2016 10:35
Show Gist options
  • Select an option

  • Save m4tlch/92c1ebe3f5ad61ecc12cd7bcd4855821 to your computer and use it in GitHub Desktop.

Select an option

Save m4tlch/92c1ebe3f5ad61ecc12cd7bcd4855821 to your computer and use it in GitHub Desktop.
function mymodule_user_login_credentials($username, $password)
{
if($uid = user_authenticate($username, $password))
{
user_login_submit(array(), array('uid' => $uid));
return true;
}
else
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment