<?php

// include WordPress
require_once('../../../wp-load.php');
require_once(ABSPATH . WPINC . '/registration.php');
global $current_user;

// update other data
foreach($_GET as $k => $v) {

	if ($v == get_the_author_meta($k, $current_user->ID)) {

		echo '<span class="warn">'.__('Nothing was changed.','news').'</span>';
	
	} elseif (($k == 'nickname' && $v == '') || ($k == 'display_name' && $v == '') || ($k == 'user_email' && $v == '') || ($k == 'user_pass' && $v == '')) {
	
		echo '<span class="error">'.__('This field is required.','news').'</span>';
	
	} else {
		
		wp_update_user( array ( 'ID' => $current_user->ID, $k => $v ) ) ;
		echo '<span class="success">'.__('Updated successfully.','news').'</span>';
			
	}

}

?>