How to log in users without credentials? We need to integrate a CRM into our Drupal site. Storing users in native database is forbidden, so we won't store users in our Drupal database, we will use CRM for that.

But we still need to be able to login/register users from drupal standard login/register forms. On a backend we need to login/register user programmatically so user would think he's logging in/registering on a site, instead he logs in/registers in CRM (which is a third party application).
You can do it like this:

global $user;
$user = user_load($uid);


Where the $uid is the User ID of the user you want to log in.

Note that this potentially opens you up to major security issues.