Merge branch 'development/2.2.5' of https://github.com/ultimatemember/ultimatemember into development/2.2.5

This commit is contained in:
Nikita Sinelnikov
2021-09-20 21:38:26 +03:00
+9 -5
View File
@@ -489,13 +489,17 @@ add_action( 'um_before_account_notifications', 'um_before_account_notifications'
/**
* Update Profile URL
* Update Profile URL, display name, full name.
*
* @param $user_id
* @param $changed
* @version 2.2.5
*
* @param int $user_id The user ID.
* @param array $changes An array of fields values.
*/
function um_after_user_account_updated_permalink( $user_id, $changed ) {
UM()->user()->generate_profile_slug( $user_id );
function um_after_user_account_updated_permalink( $user_id, $changes ) {
if ( isset( $changes['first_name'] ) && isset( $changes['last_name'] ) ) {
do_action( 'um_update_profile_full_name', $user_id, $changes );
}
}
add_action( 'um_after_user_account_updated', 'um_after_user_account_updated_permalink', 10, 2 );