Skip to main content
3 of 3
inlined the description of the function given from the documentation site
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

The "authmap" table is used when a user is authenticated using an external site, for example an OpenID server.
For example, in my test site I have used OpenID to create an account. In that table, I then found the user ID of the user account created by Drupal, and the OpenID URL used to authenticate the user (the one provided by the OpenID server).

The comment in user_external_login_register() gives a short explanation of how that table is used, and which functions the modules integrating with an external authentication server should use.

Helper function for authentication modules. Either logs in or registers the current user, based on username. Either way, the global $user object is populated and login tasks are performed.

Keep in mind that in Drupal 8 the "authmap" table, and the functionality provided by the functions using it have been removed. Any module providing the integration with an external authentication server will need to use its own database table, which is what the OpenID module did in Drupal 8, before being dropped off.

avpaderno
  • 97.9k
  • 15
  • 164
  • 284