jbob75 Posted November 28, 2013 Share Posted November 28, 2013 I'm adding a piece of functionality to an existing SAML login plugin for the "owncloud" cloud storage application https://github.com/owncloud/apps/tree/master/user_saml Within the lib/ directory of this plugin there is a hook class (hooks.php) which extracts SAML attributes and creates a user account based on this info. It currently expects email and name to be available to populate the user account details, which are not available in most identity providers. I'd like to provide a form that when a new user logs in, they can submit the personal information rather than have blank info be given by SAML. At line 83 in this hooks.php file (available at the link above), i'd like to call a page or function that would present a form to the user (with three fields - firstname, surname and email), then on submit, return to the hook class making the three variables available to the rest of the hooks class code. Since this hooks file is a 'processing' PHP file rather than a page that is rendering anything, and also part of the owncloud framework's workings, I don't think this can be done with just PHP and probably a combination of javascript/ajax might be needed. Doesn anyone have an opinion on a solution to this, i.e. being able to move out of a hook class to provide a user interactive form, then continue from the place where the hook class was - utilising the fields the user provided? Link to comment https://forums.phpfreaks.com/topic/284362-calling-a-form-from-a-php-hook-class/ Share on other sites More sharing options...
jbob75 Posted November 29, 2013 Author Share Posted November 29, 2013 I've just noticed that the app I'm using allows a redirect to another app afterwards, so I can just present the form in a new application. Please consider this thread closed! Thanks Link to comment https://forums.phpfreaks.com/topic/284362-calling-a-form-from-a-php-hook-class/#findComment-1460637 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.