loadModule(); $allSet = true; foreach ($_POST as $key=>$value) { if ( $key != submit_button) { if ( isset($value) && $value != "" ) { $info[$key] = $value; } else { // set error message App::Get()->SetMessage( array_search( $key, App::Get()->settings['attr_titles'] ) . " cannot be left blank.", CAS_MSG_ERROR ); $allSet = false; } } } if ($allSet) { // method to edit user if( App::Get()->getAuthenticationProvider()->updateProfile($info) ){ // user info change successful App::Get()->Redirect($module->moduleRoot . "/" ); } else{ // if not logged in - cannot change pwd App::Get()->SetMessage("Invalid entry",CAS_MSG_ERROR); App::Get()->Redirect($module->moduleRoot . "/manage" ); } } else { App::Get()->Redirect($module->moduleRoot . "/manage" ); }