--- onepageprofile_orig.module	2011-03-14 18:00:18.423241921 +0100
+++ onepageprofile.module	2011-03-14 20:06:34.101031433 +0100
@@ -65,6 +65,7 @@ function onepageprofile_user($op, &$edit
     case 'form':
       if ($category == 'account') {
         $form = array();
+				$fields = variable_get('profile_permission_fields', array());
 
         // Grab all of the categories provided by the profile module
         $categories = profile_categories();
@@ -79,7 +80,20 @@ function onepageprofile_user($op, &$edit
             $category_form['#id'] = 'profile_form_profile';
             $category_form['#parameters'] = array('profile_form_profile', $edit, $account, $category_name, FALSE);
             drupal_alter('form', $category_form, $form_state, 'profile_form_profile');
-            $form += $category_form;
+           
+						//catogegory name
+						//integration to profile_permission module
+						foreach ($category_form[$category['name']] as $key=>$value){
+							if (in_array($key, $fields)) {
+
+								if (!user_access(profile_permission_generate_perm_edit($key))) {
+			     				unset($category_form[$category['name']][$key]);
+			    			}//if
+							}//if
+						}//foreach
+						//*********************
+
+						$form += $category_form;
           }
         }
 
