Title: conkidd's Replies | WordPress.org

---

# conkidd

  [  ](https://wordpress.org/support/users/conkidd/)

 *   [Profile](https://wordpress.org/support/users/conkidd/)
 *   [Topics Started](https://wordpress.org/support/users/conkidd/topics/)
 *   [Replies Created](https://wordpress.org/support/users/conkidd/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/conkidd/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/conkidd/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/conkidd/engagements/)
 *   [Favorites](https://wordpress.org/support/users/conkidd/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[OneLogin SAML SSO] Provisioning Users & Custom User Meta](https://wordpress.org/support/topic/provisioning-users-custom-user-meta/)
 *  Thread Starter [conkidd](https://wordpress.org/support/users/conkidd/)
 * (@conkidd)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/provisioning-users-custom-user-meta/#post-7357205)
 * Well, after much effort over the weekend I’ve found a way to ‘hack’ the plugin
   to make the import of custom user meta work as expected. Here is how I accomplished
   this using Job Title as an example…(please if an easier method exists please 
   advise)..
 * In plugin files:
 * Step 1)
    configuration.php (line 83 – add_settings_section, we add the additional
   settings fields as follows)
 *     ```
       'onelogin_saml_attr_mapping_jobtitle' => __('Title', 'onelogin-saml-sso'),
       ```
   
 * Step 2)
    configuration.php (line 285, include a function to register the setting)
 *     ```
       function plugin_setting_string_onelogin_saml_attr_mapping_jobtitle() {
       		echo '<input type="text" name="onelogin_saml_attr_mapping_jobtitle" id="onelogin_saml_attr_mapping_jobtitle"
       			  value= "'.get_option('onelogin_saml_attr_mapping_jobtitle').'" size="30">'.
       			  '<p class="description">'.__("Job Title?", 'onelogin-saml-sso').'</p>';
       	}
       ```
   
 * Step 3)
    validate.php (line 87, $attr_mappings array we will add our setting)
 *     ```
       'onelogin_saml_attr_mapping_jobtitle' => __('Title', 'onelogin-saml-sso'),
       ```
   
 * Step 4)
    functions.php (line 235 – we will add into the onelogin_saml_updateuser()
   function to update the current user meta when they login – note you must have
   this setting enabled in the plugin for this to work.
 *     ```
       $jobTitleMapping = get_option('onelogin_saml_attr_mapping_jobtitle');
       update_user_meta($user_id, 'user_job_title', $attrs[$jobTitleMapping][0]);
       ```
   
 * Step 5)
    Go to the settings page and enter the attribute as it shows in the custom
   attribute in OneLogin Parameters. I added a custom parameter of JobTitle and 
   entered ‘JobTitle’ into the new settings field in the plugin configuration.
 * Step 6)
    I use piklist to create my user profile custom meta boxes but you could
   also use ACF or any other popular field plugin. Just make sure the field name
   matches the meta field you are trying to update in the update_user_meta function
   in step 4.
 * Expected Result: When a user logs into the WordPress site from OneLogin
 * —————————————————————————-
    Obviously in a perfect world the plugin would just
   have a hook that we could add this data into. The biggest issue I see remaining
   on my side is not being able to log in as a user or auto provision. Will keep
   working on that..
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[OneLogin SAML SSO] Provisioning Users & Custom User Meta](https://wordpress.org/support/topic/provisioning-users-custom-user-meta/)
 *  Thread Starter [conkidd](https://wordpress.org/support/users/conkidd/)
 * (@conkidd)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/provisioning-users-custom-user-meta/#post-7357128)
 * Also, why under SSO in the OneLogin app config can I not choose:
 * ‘Allow assumed users to sign into this app’
 * The option exists but will not allow the box to change to ‘true’. It reverts 
   to unchecked after click.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Active Directory Integration] Email on Every Login](https://wordpress.org/support/topic/email-on-every-login/)
 *  Thread Starter [conkidd](https://wordpress.org/support/users/conkidd/)
 * (@conkidd)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/email-on-every-login/#post-6447999)
 * Thanks macbookandrew – this appears to work! Appreciate your help here.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Active Directory Integration] Email on Every Login](https://wordpress.org/support/topic/email-on-every-login/)
 *  Thread Starter [conkidd](https://wordpress.org/support/users/conkidd/)
 * (@conkidd)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/email-on-every-login/#post-6447997)
 * Dbrieck – i tried your fix but it does not correct the issue.
 * jcrea – i don’t want to make changes to core for obvious reasons.
 * glatze – any update or proper work around on your side?
 * Thanks all.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Active Directory Integration] DISABLED-USER- Prefix](https://wordpress.org/support/topic/disabled-user-prefix/)
 *  Thread Starter [conkidd](https://wordpress.org/support/users/conkidd/)
 * (@conkidd)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/disabled-user-prefix/#post-6476143)
 * Apologies on the above. I meant to disable the email string to be updated on 
   disable user.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Active Directory Integration] Email on Every Login](https://wordpress.org/support/topic/email-on-every-login/)
 *  Thread Starter [conkidd](https://wordpress.org/support/users/conkidd/)
 * (@conkidd)
 * [11 years ago](https://wordpress.org/support/topic/email-on-every-login/#post-6447896)
 * Another issue is that when I set a user to disabled, their email address is updated
   and sends them a notification that their email address has been updated.
 * I tried to apply:
 * add_filter( ‘send_password_change_email’, ‘__return_false’);
 * However this does not solve that issue… Any advice?
 * Thanks all

Viewing 6 replies - 1 through 6 (of 6 total)