default dumy mail address
-
I tried shibboleth plugin 1.4 on wordpress-3.1.3,shibboleth-2.4.2,Linux-2.6.32(Scientific Linux 6.0).
SAML worked on this system,but problem occured about no ‘mail’ attribute user.
It was possible this user was registered as empty ‘user_email’ record in ‘wp_users’ table.
And when new shibboleth user logged in, fatal error “/public_html/wp/wp-includes/user.php on line 1395 Catchable fatal error: Object
of class WP_Error could not be converted to string in /public_html/wp/wp-includes/formatting.php on line 2822″ occured.
I wrote patch for this problem,using default dummy mail address.--- shibboleth.php.orig 2010-08-31 01:37:39.000000000 +0900 +++ shibboleth.php 2011-06-22 11:25:43.834620587 +0900 @@ -417,6 +417,10 @@ function shibboleth_update_user_data($us if ( $force_update || $shib_headers[$header]['managed'] ) { $filter = 'shibboleth_' . ( strpos($field, 'user_') === 0 ? '' : 'user_' ) . $field; $user_data[$field] = apply_filters($filter, $_SERVER[$shib_headers[$header]['name']]); + // user_email is required + if ( $field == 'user_email' && empty($user_data[$field]) ){ + $user_data[$field] = apply_filters($filter, '[email protected]' ); + } } }
The topic ‘default dumy mail address’ is closed to new replies.