Return to Snippet

Revision: 35173
at November 3, 2010 20:35 by resting


Initial Code
function fckeditor_elements() {
  global $user;
  $type = array();
  $type['textfield'] = array(
  '#process' => array(
  'fckeditor_process_input' => array()
  ),
  );
  if (user_access('access fckeditor') && $user->uid != 1) {
    // only roles with permission get the fckeditor
    if (fckeditor_is_compatible_client()) {
      // it would be useless to dig deeper if we're not able or allowed to
      $type['textarea'] = array('#process' => array('fckeditor_process_textarea' => array()));
    }
  }
  return $type;
}

Initial URL


Initial Description
Just include  
**global $user;** and  
**$user->uid != 1** into the function

Initial Title
Drupal Disable FCK for user 1

Initial Tags
drupal

Initial Language
PHP