| 1 |
<?php |
<?php |
| 2 |
// $Id: mysql_auth_update.module,v 1.1 2006/02/23 07:40:22 koumbit Exp $ |
// $Id: sql_auth_update.module,v 1.1 2006/02/23 20:24:06 anarcat Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 11 |
/** |
/** |
| 12 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 13 |
*/ |
*/ |
| 14 |
function sql_auth_create_help($section) { |
function sql_auth_update_help($section) { |
| 15 |
switch ($section) { |
switch ($section) { |
| 16 |
case 'admin/modules#description': |
case 'admin/modules#description': |
| 17 |
return t('Create users in related database'); |
return t('Update users in related external auth database'); |
| 18 |
} |
} |
| 19 |
} |
} |
| 20 |
|
|
| 21 |
function sql_auth_create_user($op, &$edit, &$user, $category = NULL) { |
function sql_auth_update_user($op, &$edit, &$user, $category = NULL) { |
| 22 |
switch ($op) { |
switch ($op) { |
| 23 |
case 'insert': |
case 'insert': |
| 24 |
/* recall: |
/* recall: |
| 26 |
* 1 everyone |
* 1 everyone |
| 27 |
* 2 approval necessary |
* 2 approval necessary |
| 28 |
*/ |
*/ |
|
print "insert hook"; |
|
| 29 |
if (variable_get('user_register', 1) == 1) { |
if (variable_get('user_register', 1) == 1) { |
| 30 |
$salt = ''; |
$salt = ''; |
| 31 |
if (variable_get('mysql_auth_pass_salt', 0)) { |
if (variable_get('mysql_auth_pass_salt', 0)) { |