Drupal Disable FCK for user 1


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.