diff --git a/README.md b/README.md index d9f5fb5..72ee12e 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,12 @@ There are several ways Azure AD groups can be created/managed. Some of them requ * **Azure AD PowerShell**. The [Azure AD PowerShell module](https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0) allows admins and (optionally) users to create and manage groups. (e.g. [New-AzureADGroup](https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureadgroup?view=azureadps-2.0), and [Add-AzureADGroupMember](https://docs.microsoft.com/en-us/powershell/module/azuread/add-azureadgroupmember?view=azureadps-2.0) cmdlets.) * **On-premises**. Many large organizations use Azure AD Connect to sync their on-premises AD to Azure AD. This usually includes all on-premises AD groups and memberships. Once these groups are synced to Azrue AD, they can be used with this plugin. +## Action Reference + +| Action | Arguments | Description +| --- | --- | --- +| aadsso_after_authenticate_success | $jwt, $user | Fires after sucessfull authentication. Usefull for storing aditional data from azure as usermeta + ## Advanced ### Refreshing the OpenID Connect configuration cache diff --git a/aad-sso-wordpress.php b/aad-sso-wordpress.php index e54fd54..6681759 100644 --- a/aad-sso-wordpress.php +++ b/aad-sso-wordpress.php @@ -319,6 +319,8 @@ function authenticate( $user, $username, $password ) { if ( true === $this->settings->enable_aad_group_to_wp_role ) { $user = $this->update_wp_user_roles( $user, $group_memberships ); } + + do_action('aadsso_after_authenticate_success', $jwt, $user); } } elseif ( isset( $token->error ) ) {