Index: trunk/admin/index.php
===================================================================
--- trunk/admin/index.php	(revision 199)
+++ trunk/admin/index.php	(revision 200)
@@ -30,4 +30,48 @@
 //include_once 'cp_functions.php';
 
+function admin_check_user_meta_prefix($is_report = false){
+	global $xoopsModule;
+	$xoopsDB =& Database::getInstance();
+	
+	$mydirname = basename(dirname(dirname(__FILE__)));
+	$my_dirpath = dirname(dirname(__FILE__));
+	$wp_prefix_only = $mydirname;
+	if ($wp_prefix_only == 'wordpress') $wp_prefix_only ='wp';
+	$db_prefix = $xoopsDB->prefix($wp_prefix_only);
+
+	$usermeta_tbl = $db_prefix . '_usermeta';	
+	$meta_key_pattern = '_' . $wp_prefix_only . '_';
+
+	$sql = "SELECT count(umeta_id) as data_count ,meta_key FROM $usermeta_tbl GROUP BY meta_key HAVING meta_key LIKE '%" . $meta_key_pattern ."%'" ;
+	$res =  $xoopsDB->query($sql, 0, 0);
+	
+	if ($res === false){
+		$check_str = _AM_XP2_USER_META_NONE . "<br />\n";
+	} else {
+		$error =false;
+		$check_str = '';
+		while($row = $xoopsDB->fetchArray($res)){
+			$data_count  = $row['data_count'];
+			$meta_key = $row['meta_key'];
+			if ( !preg_match('/^'.$db_prefix. '_.*/',$meta_key , $maches)){
+				$check_str .= sprintf(_AM_XP2_USER_META_ERR , $meta_key,$data_count) ."<br /> \n";
+				$error = true;
+			}
+		}
+		if (!$error)
+			$check_str = _AM_XP2_USER_META_OK ;
+	}
+	if ($is_report) {
+		echo "******** "  . _AM_XP2_USER_META_KEY . "********" . "<br />\n";
+		echo $check_str . "<br />\n<br />\n";
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_USER_META_KEY . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo $check_str;
+		echo "</div>";
+		echo "</fieldset>";
+	}
+
+}
 
 function get_xpress_plugin_data( $plugin_file, $markup = true, $translate = true ) {
@@ -565,4 +609,5 @@
 xpress_active_plugin_list($report);
 xpress_block_state($report);
+admin_check_user_meta_prefix($report);
 xpress_state($report);
 echo '<form method="POST">'."\n";
