Skip to content

Commit

Permalink
fix bug where shibboleth users couldn't update their profile. (props …
Browse files Browse the repository at this point in the history
…pchapman on bug report)

git-svn-id: http://plugins.svn.wordpress.org/shibboleth/trunk@112339 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
wnorris committed Apr 21, 2009
1 parent acc0ccd commit 118476e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shibboleth.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ function shibboleth_deactivate_plugin() {
* Authenticate the user.
*/
function shibboleth_authenticate($user, $username, $password) {
global $action;
if ($action == 'local_login' || array_key_exists('loggedout', $_REQUEST) || array_key_exists('wp-submit', $_POST)) return $user;
if (array_key_exists('loggedout', $_REQUEST) || array_key_exists('wp-submit', $_POST)) return $user;

if ($_SERVER['Shib-Session-ID'] || $_SERVER['HTTP_SHIB_IDENTITY_PROVIDER']) {
return shibboleth_authenticate_user();
Expand All @@ -107,7 +106,6 @@ function shibboleth_authenticate($user, $username, $password) {
function shibboleth_wp_login() {
if ($GLOBALS['pagenow'] != 'wp-login.php') return;


switch ($_REQUEST['action']) {
case 'shibboleth':
if ($_SERVER['Shib-Session-ID'] || $_SERVER['HTTP_SHIB_IDENTITY_PROVIDER']) {
Expand Down Expand Up @@ -423,6 +421,9 @@ function shibboleth_profile_personal_options() {
jQuery("#first_name,#last_name,#nickname,#display_name,#email").attr("disabled", true);
jQuery("h3:contains(\'Name\')").after("<div class=\"updated fade\"><p>'
. __('These fields cannot be changed from WordPress.', 'shibboleth') . '<p></div>");
jQuery("form#your-profile").submit(function() {
jQuery("#first_name,#last_name,#nickname,#display_name,#email").attr("disabled", false);
});
});
</script>';
}
Expand Down

0 comments on commit 118476e

Please sign in to comment.