Commit 60d6565e authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files
parents 1cbb0511 32ad31d8
......@@ -27,7 +27,7 @@
define('INTERNAL', 1);
define('ADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('form.php');
require_once('pieforms/pieform.php');
$plugintype = param_alpha('plugintype');
$pluginname = param_alpha('pluginname');
......@@ -71,7 +71,7 @@ $form['elements']['type'] = array(
);
$smarty = smarty();
$smarty->assign('form', form($form));
$smarty->assign('form', pieform($form));
$smarty->assign('plugintype', $plugintype);
$smarty->assign('pluginname', $pluginname);
$smarty->assign('type', $type);
......@@ -97,16 +97,14 @@ function pluginconfig_submit($values) {
json_reply(false, get_string('settingssaved'));
}
else {
json_reply(false, get_string('settingssavefailed'));
json_reply('local', get_string('settingssavefailed'));
}
}
function pluginconfig_validate(Form $form, $values) {
function pluginconfig_validate(PieForm $form, $values) {
global $validatefunction, $plugintype, $pluginname, $classname;
if (!empty($validatefunction)) {
call_static_method($classname, $validatefunction, $form, $values);
}
}
?>
......@@ -192,7 +192,7 @@ class AuthInternal extends Auth {
}
/**
* Plugin configuration class. Nothing special required for this plugin...
* Plugin configuration class
*/
class PluginAuthInternal extends Plugin {
......
......@@ -67,42 +67,6 @@ abstract class Auth {
*/
public static abstract function get_user_info($username);
/**
* Returns a hash of information that will be rendered into a form when
* configuring authentication.
*
* This is defined to be empty, so that authentication methods do not have
* to specify a form if they do not need to.
*
* If an authentication method is to return any elements, the return result
* <b>must</b> be wrapped in a call to {@link build_form}.
*
* For example:
*
* <pre>
* $elements = array(
* // ... describe elements here ...
* );
* return Auth::build_form($elements);
* </pre>
*
* @return array The form for configuring the authentication method
*/
public static function get_configuration_form() {
}
/**
* Given a submission from the configuration form, validates it
*
* This is defined to be empty, so that authentication methods do not have
* to specify any validation rules if they do not need to.
*
* @param array $values The submitted values for the form
* @param Pieform $form The form being validated
*/
public static function validate_configuration_form(Pieform $form, $values) {
}
/**
* Given a password, returns whether it is in a valid format for this
* authentication method.
......
......@@ -69,6 +69,7 @@ if (isset($_REQUEST['key'])) {
// Move the user record to the usr table from the registration table
$registrationid = $registration->id;
unset($registration->id);
unset($registration->expiry);
$registration->id = insert_record('usr', $registration, 'id', true);
log_debug($registration);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment