derricksmith / phpsaml

GLPI Plugin - SAML integration using the Onelogin SAML Library
MIT License
32 stars 24 forks source link

Update routine not triggered correctly on migrate #138

Closed DonutsNL closed 2 months ago

DonutsNL commented 1 year ago

https://github.com/derricksmith/phpsaml/blob/988157eb826e44bccfc8b96c8b3c8e468494e1a2/hook.php#L82

We need to refactor this a bit to make sure the update routine is triggered properly. Prob we need to use the Migrate object.

As a work arround the routine is now also triggered if the database column count is different then what was expected. As an corrective measure the update is triggered by the config.class.php here :

https://github.com/DonutsNL/phpsaml/blob/4deac6e7c7fe42446d2839f0ae1e8ca3f7a45bc3/inc/config.class.php#L250

This should 'idealy' never get triggered...