1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Alt-Auth support for User-Id. (work in progress)

This commit is contained in:
Cameron
2013-06-11 15:47:44 -07:00
parent 4818785c4c
commit edbff3701c
2 changed files with 11 additions and 5 deletions

View File

@@ -111,6 +111,7 @@ class alt_auth_admin extends alt_auth_base
* 'default' may be a single value to set the same for all connect methods, or an array to set different defaults.
*/
private $alt_auth_user_fields = array(
'user_id' => array('prompt' => "User Id", 'help'=>'Use with caution', 'default' => false, 'optional' => TRUE, 'otherdb' => FALSE, 'e107db' => TRUE, 'importdb' => FALSE, 'ldap' => FALSE),
'user_email' => array('prompt' => LAN_ALT_12, 'default' => 'user_email', 'optional' => TRUE, 'otherdb' => TRUE, 'e107db' => TRUE, 'importdb' => FALSE, 'ldap' => TRUE, 'ldap_field' => 'mail'),
'user_hideemail' => array('prompt' => LAN_ALT_13, 'default' => 'user_hideemail', 'optional' => TRUE, 'otherdb' => TRUE, 'e107db' => TRUE, 'importdb' => FALSE, 'ldap' => TRUE, 'ldap_field' => '', method => 'bool1'),
'user_name' => array('prompt' => LAN_ALT_14, 'default' => 'user_name', 'optional' => TRUE, 'otherdb' => TRUE, 'e107db' => TRUE, 'importdb' => FALSE, 'ldap' => TRUE, 'ldap_field' => ''),
@@ -143,10 +144,7 @@ class alt_auth_admin extends alt_auth_base
$ret .= "<tr><td$log>";
if ($v['optional'] == FALSE) $ret .= '*&nbsp;';
$ret .= $v['prompt'].':';
if (isset($v['help']))
{
$ret .= "<br /><span class='smalltext'>".$v['help']."</span>";
}
$ret .= "</td><td$log>";
// $fieldname = $tableType.'_'.$v['optname'];
$fieldname = $tableType.'_xf_'.$f; // Name of the input box
@@ -172,6 +170,12 @@ class alt_auth_admin extends alt_auth_base
$ret .= '&nbsp;&nbsp;'.$this->alt_auth_processing($fieldMethod,$v['method'], $method);
}
}
if (isset($v['help']))
{
$ret .= "<span class='field-help smalltext'>".$v['help']."</span>";
}
$ret .= "</td></tr>\n";
}
}

View File

@@ -211,7 +211,9 @@ class alt_login
$newUser['data'] = $db_vals;
$userMethods->addNonDefaulted($newUser);
validatorClass::addFieldTypes($userMethods->userVettingInfo,$newUser);
$newID = $aa_sql->db_Insert('user',$newUser);
$newID = $aa_sql->insert('user',$newUser);
if ($newID !== FALSE)
{
if (count($xFields))