Title: Additional User Attributes
Last modified: November 29, 2017

---

# Additional User Attributes

 *  Resolved [dbthorburn](https://wordpress.org/support/users/dbthorburn/)
 * (@dbthorburn)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/additional-user-attributes/)
 * Using WP SAML Auth integrated with SimpleSAMLphp, everything works great and 
   loving it so far. Setting the baked-in attributes (user_login_attribute, user_email_attribute,
   display_name_attribute, first_name_attribute, last_name_attribute) from the SAML
   response is easy and works great also, but now I am wondering if it is possible
   to set custom user profile fields? I have created a custom plugin that adds custom
   user profile fields using the update_usermeta() function, but now I want to be
   able to extract data from the SAML response and set those custom fields when 
   a user authenticates. Any help is greatly appreciated.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/additional-user-attributes/#post-9731724)
 * Hi [@dbthorburn](https://wordpress.org/support/users/dbthorburn/),
 * You can use the `wp_saml_auth_new_user_authenticated` action to handle additional
   response attributes. Here’s an untested example:
 *     ```
       add_action( 'wp_saml_auth_new_user_authenticated', function( $user, $attributes ) {
           update_post_meta( $user->ID, 'foo', $attributes['foo'] );
       }, 10, 2 );
       ```
   
 * You’ll need to inspect the `$attributes` variable for the attributes you’d like
   to store.
    -  This reply was modified 8 years, 6 months ago by [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/).

Viewing 1 replies (of 1 total)

The topic ‘Additional User Attributes’ is closed to new replies.

 * ![](https://ps.w.org/wp-saml-auth/assets/icon-256x256.png?rev=3348767)
 * [WP SAML Auth](https://wordpress.org/plugins/wp-saml-auth/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-saml-auth/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-saml-auth/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-saml-auth/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-saml-auth/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-saml-auth/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/additional-user-attributes/#post-9731724)
 * Status: resolved