I am writing this Drupal 8 module. I am setting up some configuration settings here

But when I retrieve it here using $this->config()->get() it is not giving anything. Any idea what am I doing wrong?

2 Answers 2


The problem is in your flood_control.settings.yml.

  user_failed_login_ip_limit: 50

This way, to get user_failed_login_ip_limit you must use $this->config(flood_control.settings)->get('flood_control.user_failed_login_ip_limit'). Or just remove flood_control: on first line for better use.


I was stupid enough to not include the schema for the settings. I have made it working by including schema file like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.