title: Remove publishing capability from user IDs
body: <p>I'm trying to remove the capability of users other than the administrator/superadmin (ID number 1) to add a page, I know that there are plugins which you can edit the wordpress role but in my case I need it to be per user/username/userid (no plugin that I no of is available).. </p>
  
  <p>Currently user number 2 needs to be 'Administrator' because a specific plugin I use only displays reports to 'Administrator' role but I need to remove add page capabilities. I have the following code:</p>
  
  <pre><code>function modify_capabilities()
  {
  global $userdata;
  get_currentuserinfo();
    $userdata-&gt;ID != 1 -&gt;remove_cap('publish_pages');
  
   }
  
  add_action('admin_init','modify_capabilities');
  </code></pre>
  
  <p>But it doesn't work.. The error is in this line:</p>
  
  <p><code>$userdata-&gt;ID != 1 -&gt;remove_cap('publish_pages');</code></p>