How to get the file directory of user pictures in Drupal 8?

by PertFayonner   Last Updated April 16, 2018 21:07 PM

I have this code in Drupal 7 using variable_get to get the default file directory for the user pictures.

$path = variable_get('user_picture_path', 'pictures');

I came across this function which has to be used in Drupal 8 instead of variable_get.

$my_config = \Drupal::config('mymodule.settings')->get('name_of_form_field');

But I not sure which configuration object name should I use in place of 'mymodule.settings' to get the user_picture_path and what is the exact way of knowing which config obj to be used.

Some suggestion please.

Related Questions

Using Configuration API in drupal 8

Updated June 15, 2015 23:03 PM

Config folder in drupal8

Updated April 13, 2016 08:03 AM