| 1 |
<?php |
<?php |
| 2 |
// $Id: phpbb.module,v 1.11 2006/06/27 01:48:37 arkepp Exp $ |
// $Id: phpbb.module,v 1.12 2006/09/06 00:26:45 arkepp Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* http://drupal.org/node/32818 |
* http://drupal.org/node/32818 |
| 84 |
|
|
| 85 |
// Insert a group for the user |
// Insert a group for the user |
| 86 |
if ( 1 != $edit['uid']) { |
if ( 1 != $edit['uid']) { |
| 87 |
$group_id = $edit['uid']; |
|
| 88 |
$query = "INSERT INTO " . $prefix . "groups (`group_id`,`group_type`,`group_name`,`group_description`,`group_moderator`,`group_single_user`) " |
$query = "INSERT INTO " . $prefix . "groups (`group_type`,`group_name`,`group_description`,`group_moderator`,`group_single_user`) " |
| 89 |
." VALUES(".$edit['uid'] . ",1,'" . _phpbb_encode($edit['name']) ."','Personal User',0,1)"; |
." VALUES( 1,'" . _phpbb_encode($edit['name']) ."','Personal User',0,1)"; |
| 90 |
$res = mysql_query($query, $phpbb_dbc) or die('Query failed: ' . mysql_error() . " \n" . $query . "\n"); |
$res = mysql_query($query, $phpbb_dbc) or die('Query failed: ' . mysql_error() . " \n" . $query . "\n"); |
| 91 |
|
$group_id = mysql_insert_id($phpbb_dbc); |
| 92 |
|
|
| 93 |
} else { |
} else { |
| 94 |
// We don't want user number 1 in Drupal to overlap with the anonymous group in phpBB |
// We don't want user number 1 in Drupal to overlap with the anonymous group in phpBB |
| 95 |
$group_id = 2; |
$group_id = 2; |