Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Make require for own autoload.php optional.
Browse files Browse the repository at this point in the history
Our own autoload will be present if we run composer for this module itself.
However, if it was installed via SSP's composer-module-installer, then the
dependencies will be in the global autoload.php which is already loaded.
  • Loading branch information
thijskh committed Sep 1, 2015
1 parent 75f8c38 commit 962d385
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/Auth/Process/AttributeAddVootGroups.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?php

require_once dirname(dirname(dirname(__DIR__))) . '/vendor/autoload.php';
// Conditionally include composer autoload file;
// we don't need it if installed with SSP's composer-module-installer.
if ( file_exists(dirname(dirname(dirname(__DIR__))) . '/vendor/autoload.php') ) {
require_once dirname(dirname(dirname(__DIR__))) . '/vendor/autoload.php';
}

/**
* Filter to add group membership to attributes from VOOT provider.
Expand Down
6 changes: 5 additions & 1 deletion www/callback.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';
// Conditionally include composer autoload file;
// we don't need it if installed with SSP's composer-module-installer.
if ( file_exists(dirname(__DIR__) . '/vendor/autoload.php') ) {
require_once dirname(__DIR__) . '/vendor/autoload.php';
}

if (!array_key_exists('state', $_REQUEST)) {
throw new SimpleSAML_Error_BadRequest('Missing required state query parameter.');
Expand Down

0 comments on commit 962d385

Please sign in to comment.