2 issues:

1) Do not require files in this manner
[code]
require_once('duo.php');
require_once('duo_web.php');
[/code]

1) they will be included anytime drupal is bootstrapped. Do you really need them to be? If they have to be, put them inside a hook_init. However in looking at your code, it just seems a tad lazy. Please only run the code where you need it as it has performance implications.

Comments

btopro’s picture

Title: Do not require » Code clean up
Version: 7.x-1.5 » 7.x-1.8
Category: Bug report » Task
Issue summary: View changes

Please review the Coder module to follow coding conventions of Drupal https://www.drupal.org/project/coder . There's lots of little things to clean up perceived code quality. We are looking into adoption here and need to figure out how to make it play nice with cosign based authentication systems wrapped onto drupal.

integrations@duosecurity.com’s picture

Status: Active » Closed (fixed)

Thanks for the recommendations! CodeSniffer is a pretty cool tool! This issue has been fixed in the latest release. Here's the specific commit: https://github.com/duosecurity/duo_drupal/commit/ce56fd8f5b38d1dc9c22e87...