From 7d498684fbd2d235c7e15e2a55c80d50244ac238 Mon Sep 17 00:00:00 2001
From: Chris Gross <gross.364@osu.edu>
Date: Thu, 17 Mar 2016 11:23:12 -0400
Subject: [PATCH] daily build

---
 profiles/wcm_base/CHANGELOG.txt               |  5 +++
 .../contrib/simplesamlphp_auth/PATCHES.txt    |  1 +
 .../simplesamlphp_auth.module                 | 33 +++++++------------
 .../workbench_moderation.info                 |  3 ++
 .../ocio_simplesamlphp_auth.make              |  1 +
 .../plugins/accordion/editor-accordion.css    |  2 --
 .../ocio_wysiwyg/plugins/tabs/editor-tabs.css |  1 -
 .../css/ocio-omega-base.no-query.css          |  4 +--
 .../css/ocio-omega-base.styles.css            |  4 +--
 .../sass/components/_widgets.scss             |  6 ++--
 10 files changed, 27 insertions(+), 33 deletions(-)

diff --git a/profiles/wcm_base/CHANGELOG.txt b/profiles/wcm_base/CHANGELOG.txt
index e8044359..17fcc2d7 100644
--- a/profiles/wcm_base/CHANGELOG.txt
+++ b/profiles/wcm_base/CHANGELOG.txt
@@ -1,3 +1,8 @@
+WCM Base 7.x-1.x, 2016-03-17
+----------------------------
+- OCIO SimpleSAMLphp Auth: Added patch to fix missing email address when
+  accounts are auto-provisioned.
+
 WCM Base 7.x-1.x, 2016-03-15
 ----------------------------
 - OCIO Omega Base: Added styles for tabs, start importing webfonts in CSS.
diff --git a/profiles/wcm_base/modules/contrib/simplesamlphp_auth/PATCHES.txt b/profiles/wcm_base/modules/contrib/simplesamlphp_auth/PATCHES.txt
index 7fcd2a87..b92ca3f0 100644
--- a/profiles/wcm_base/modules/contrib/simplesamlphp_auth/PATCHES.txt
+++ b/profiles/wcm_base/modules/contrib/simplesamlphp_auth/PATCHES.txt
@@ -1,4 +1,5 @@
 The following patches have been applied to this project:
 - http://drupal.org/files/issues/simplesamlphp_auth-admin-users-cannot-other-users-9291915-8.patch
+- http://drupal.org/files/issues/simplesamlphp_auth-alter_data_before_writing-2148931-5.patch
 
 This file was automatically generated by Drush Make (http://drupal.org/project/drush).
\ No newline at end of file
diff --git a/profiles/wcm_base/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module b/profiles/wcm_base/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
index afe1de4d..55ce9eb0 100644
--- a/profiles/wcm_base/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
+++ b/profiles/wcm_base/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
@@ -314,7 +314,7 @@ function simplesamlphp_auth_init() {
 
         // If user IDs or roles are specified, we let them in, but everyone else gets logged out.
         if (drupal_strlen($strAllwDefLogUsers) || $arrAllwDefLogRoles) {
-          
+
           // Convert the string into an array.
           // @todo Perform a test to make sure that only numbers, spaces, or commas are in the string.
           $arrAllwDefLogUsers = explode(',', $strAllwDefLogUsers);
@@ -338,18 +338,18 @@ function simplesamlphp_auth_init() {
               _simplesamlphp_auth_destroy_drupal_session();
             }
           }
-          
+
         } // Test for specified users.
-        
+
       } // End if $_simplesamlphp_auth_as->isAuthenticated().
     } // End test to see if we allow default logins.
   } // End if user->uid.
 }
 
 /**
- * Implements hook_user_insert().
+ * Implements hook_user_presave().
  */
-function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
+function simplesamlphp_auth_user_presave(&$edit, $account, $category = NULL) {
   global $_simplesamlphp_auth_as;
   global $_simplesamlphp_auth_saml_attributes;
   global $user;
@@ -370,7 +370,7 @@ function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
         // Get name from default attributes.
         try {
           _simplesaml_auth_debug(t('Registering user [%acctname]', array('%acctname' => $account->name)));
-          $account->name = _simplesamlphp_auth_get_default_name($account->uid);
+          $edit['name'] = _simplesamlphp_auth_get_default_name($account->uid);
         }
         catch (Exception $e) {
           drupal_set_message(t('Your user name was not provided by your identity provider (IDP).'), "error");
@@ -378,11 +378,6 @@ function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
         }
       }
 
-      db_update('users')
-        ->fields(array('name' => $account->name))
-        ->condition('uid', $account->uid)
-        ->execute();
-
       _simplesaml_auth_debug(t('Updating username [%acctname]', array('%acctname' => $account->name)));
 
       $mail_address = '';
@@ -390,6 +385,7 @@ function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
         // Get mail from default attribute.
         try {
           $mail_address = _simplesamlphp_auth_get_mail();
+          $edit['mail'] = $edit['init'] = $mail_address;
         }
         catch (Exception $e)  {
           drupal_set_message(t('Your e-mail address was not provided by your identity provider (IDP).'), "error");
@@ -402,15 +398,8 @@ function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
         }
       }
 
-      if (!empty($mail_address)) {
-        db_update('users')
-          ->fields(array('mail' => $mail_address))
-          ->condition('uid', $account->uid)
-          ->execute();
-      }
-      
       if (module_exists('rules')) {
-        rules_invoke_event('simplesamlphp_auth_rules_event_register', $account); 
+        rules_invoke_event('simplesamlphp_auth_rules_event_register', $account);
       }
 
       _simplesaml_auth_debug(t('Updating mail [%mailaddr]', array('%mailaddr' => $mail_address)));
@@ -472,7 +461,7 @@ function simplesamlphp_auth_settings() {
   $form['simplesamlphp_auth_grp_setup'] = array(
     '#type' => 'fieldset',
     '#title' => t('Basic Setup'),
-    '#collapsible' => FALSE, 
+    '#collapsible' => FALSE,
   );
   $form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_activate'] = array(
     '#type' => 'checkbox',
@@ -498,11 +487,11 @@ function simplesamlphp_auth_settings() {
     '#default_value' => variable_get('simplesamlphp_auth_forcehttps', TRUE),
     '#description' => t('Should be enabled on production sites.'),
   );
-  
+
   $form['simplesamlphp_auth_grp_user'] = array(
     '#type' => 'fieldset',
     '#title' => t('User Info and Syncing'),
-    '#collapsible' => FALSE, 
+    '#collapsible' => FALSE,
   );
   $form['simplesamlphp_auth_grp_user']['simplesamlphp_auth_user_name'] = array(
     '#type' => 'textfield',
diff --git a/profiles/wcm_base/modules/contrib/workbench_moderation/workbench_moderation.info b/profiles/wcm_base/modules/contrib/workbench_moderation/workbench_moderation.info
index 3f9939f1..2ce7d02d 100644
--- a/profiles/wcm_base/modules/contrib/workbench_moderation/workbench_moderation.info
+++ b/profiles/wcm_base/modules/contrib/workbench_moderation/workbench_moderation.info
@@ -16,3 +16,6 @@ files[] = workbench_moderation.migrate.inc
 files[] = tests/external_node_update.test
 files[] = tests/workbench_moderation.test
 files[] = tests/workbench_moderation.files.test
+
+; Dependencies that are only required for the testbot.
+test_dependencies[] = drafty
diff --git a/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.make b/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.make
index 3581e9f8..05cc6987 100644
--- a/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.make
+++ b/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.make
@@ -9,3 +9,4 @@ core = 7.x
 projects[simplesamlphp_auth][version] = 2.0-alpha2
 projects[simplesamlphp_auth][subdir] = contrib
 projects[simplesamlphp_auth][patch][9291915] = http://drupal.org/files/issues/simplesamlphp_auth-admin-users-cannot-other-users-9291915-8.patch
+projects[simplesamlphp_auth][patch][2148931] = http://drupal.org/files/issues/simplesamlphp_auth-alter_data_before_writing-2148931-5.patch
diff --git a/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/accordion/editor-accordion.css b/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/accordion/editor-accordion.css
index 7396520a..bb55875b 100644
--- a/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/accordion/editor-accordion.css
+++ b/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/accordion/editor-accordion.css
@@ -40,8 +40,6 @@
   margin-top: -0.5em;
 }
 
-/*.cke_widget_tabs.cke_widget_focused*/
-
 .cke_widget_accordion + .cke_widget_accordion:before {
   background-color: #e0e0e0;
   content: "";
diff --git a/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/tabs/editor-tabs.css b/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/tabs/editor-tabs.css
index 4da23524..f2c77797 100644
--- a/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/tabs/editor-tabs.css
+++ b/profiles/wcm_base/modules/custom/ocio_wysiwyg/plugins/tabs/editor-tabs.css
@@ -40,7 +40,6 @@
   margin-top: -0.5em;
 }
 
-
 .cke_widget_tabs + .cke_widget_tabs:before {
   background-color: #e0e0e0;
   content: "";
diff --git a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css
index c22ce014..d94d21e3 100644
--- a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css
+++ b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css
@@ -2253,7 +2253,7 @@ body .ui-accordion .ui-accordion-header {
   padding: 0.5em 1em 0.4em 1.9em;
 }
 body .ui-accordion .ui-accordion-header.cke_widget_editable {
-  padding: 0.5em 1em 0.3em 1.9em;
+  padding: 0.5em 3em 0.3em 1.9em;
 }
 body .ui-accordion .ui-accordion-header p {
   margin: 0;
@@ -2297,7 +2297,7 @@ body .ui-tabs .ui-tabs-nav, body .ui-tabs .ui-tabs-nav a {
 }
 body .ui-tabs .ui-tabs-nav.cke_widget_editable {
   background-color: #e0e0e0;
-  padding: 0.5em 1em 0.3em 1.9em;
+  padding: 0.5em 3em 0.3em 1.9em;
 }
 body .ui-tabs .ui-tabs-nav li, body .ui-tabs .ui-tabs-nav li.ui-state-active, body .ui-tabs .ui-tabs-nav li.ui-state-default, body .ui-tabs .ui-tabs-nav li.ui-state-hover {
   border-width: 1px 1px 0;
diff --git a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css
index b0974fb7..ad4422b2 100644
--- a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css
+++ b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css
@@ -2285,7 +2285,7 @@ body .ui-accordion .ui-accordion-header {
   padding: 0.5em 1em 0.4em 1.9em;
 }
 body .ui-accordion .ui-accordion-header.cke_widget_editable {
-  padding: 0.5em 1em 0.3em 1.9em;
+  padding: 0.5em 3em 0.3em 1.9em;
 }
 body .ui-accordion .ui-accordion-header p {
   margin: 0;
@@ -2329,7 +2329,7 @@ body .ui-tabs .ui-tabs-nav, body .ui-tabs .ui-tabs-nav a {
 }
 body .ui-tabs .ui-tabs-nav.cke_widget_editable {
   background-color: #e0e0e0;
-  padding: 0.5em 1em 0.3em 1.9em;
+  padding: 0.5em 3em 0.3em 1.9em;
 }
 body .ui-tabs .ui-tabs-nav li, body .ui-tabs .ui-tabs-nav li.ui-state-active, body .ui-tabs .ui-tabs-nav li.ui-state-default, body .ui-tabs .ui-tabs-nav li.ui-state-hover {
   border-width: 1px 1px 0;
diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_widgets.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_widgets.scss
index 213a982b..dc34526e 100644
--- a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_widgets.scss
+++ b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_widgets.scss
@@ -15,7 +15,7 @@ body {
       padding: 0.5em 1em 0.4em 1.9em;
 
       &.cke_widget_editable {
-        padding: 0.5em 1em 0.3em 1.9em;
+        padding: 0.5em 3em 0.3em 1.9em;
       }
 
       p {
@@ -69,7 +69,7 @@ body {
 
       &.cke_widget_editable {
         background-color: $accent;
-        padding: 0.5em 1em 0.3em 1.9em;
+        padding: 0.5em 3em 0.3em 1.9em;
       }
 
       li {
@@ -89,8 +89,6 @@ body {
           background-color: $white;
         }
       }
-
-
     }
 
    .ui-tabs-content {
-- 
GitLab