Drupal: dprint_r () output is accessible only to administrators?

Is this the output of the dprint_r () function (entered by the devel module), visible only if I am logged in to drupal (as an admin user)?

thank

+3
source share
1 answer

Looking at the definition of a function, you will find:

/**
 * Pretty-print a variable to the browser (no krumo).
 * Displays only for users with proper permissions. If
 * you want a string returned instead of a print, use the 2nd param.
 */
function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r', $check= TRUE) {
  if (user_access('access devel information')) {
    // Snipped main function code ...
  }
}

Thus, it will only produce output for users with permission access devel information. If you assigned this permission without any role, only user 1 will see the exit.

+2
source

Source: https://habr.com/ru/post/1751964/


All Articles