Posted By

resting on 11/03/10


Tagged

fck drupal disable


Versions (?)

Drupal Disable FCK for user 1


 / Published in: PHP
 

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

  1. function fckeditor_elements() {
  2. global $user;
  3. $type = array();
  4. $type['textfield'] = array(
  5. '#process' => array(
  6. 'fckeditor_process_input' => array()
  7. ),
  8. );
  9. if (user_access('access fckeditor') && $user->uid != 1) {
  10. // only roles with permission get the fckeditor
  11. if (fckeditor_is_compatible_client()) {
  12. // it would be useless to dig deeper if we're not able or allowed to
  13. $type['textarea'] = array('#process' => array('fckeditor_process_textarea' => array()));
  14. }
  15. }
  16. return $type;
  17. }

Report this snippet  

You need to login to post a comment.