Mod Name / Version: Add New Users via Admin Panel
Description: Just a simple way for Administrator's to add New Users via the admin panel like UBB Classic
Working Under: UBB.Threads 6.4
Mod Status: Beta
Any pre-requisites: Author(s): Omegatron
Date: 01/08/04
Credits: Scream for creating UBBTHREADS
Files Altered: admin/menu.php
New Files: admin/adminnewuser.php
admin/adminadduser.php
/languages/english/admin/adminnewuser.php
/languages/english/admin/adminadduser.php
Database Altered: No
Info/Instructions: Following instructions and upload new files
Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
sorry I have an issue with this...
[]Description: Just a simple way for User's to add New Users via the admin panel like UBB Classic [/]
should say
[]Description: Just a simple way for Administrator's to add New Users via the admin panel like UBB Classic [/]
can't give those dirty slimey users too much power..
LOL Dont ya just love typo's
upgraded to 6.4.1 and get errors. Not sure if its me or this mod.
SQL ERROR: Database error only visible to forum administrators
Warning: Cannot add header information - headers already sent by (output started at /home/www/steelheader/ubbthreads/mysql.inc.php:238) in /home/www/steelheader/ubbthreads/ubbt.inc.php on line 265
Warning: Cannot add header information - headers already sent by (output started at /home/www/steelheader/ubbthreads/mysql.inc.php:238) in /home/www/steelheader/ubbthreads/ubbt.inc.php on line 319
Isn't headers already sent usually related to white space at after the closing tag in a language file?
I double checked everything for you. There was a misplaced comma that gave you the sql error. Zip is updated.
However on to your header thing. Since you get that after adding the user it is safe to assume your problem is combination of things on your install. Here is the code that your install does not like.
$html -> send_header($ubbt_lang['NEW_CONFIRM'],$Cat,0,0,0,0);
$html -> admin_table_header("{$ubbt_lang['NEW_CONFIRM']}:");
$html -> open_admin_table();
echo "
<tr>
<td class="lighttable">
{$ubbt_lang['NEW_BODY']}
</td>
</tr>
";
$html -> close_table();
$html -> send_admin_footer();
?>
You could try commenting out everything here except the send_admin)footer and see if that gets rid of your problem.
Uploaded the fresh files and errors went away. Thanks
Is there any way to make this so it bypasses the email confirmation, so it adds them straight onto the database as active ?
in adminadduser.php try commenting out the following lines with //
[]// ----------------------
// Check the email format
if (!eregi("^[+_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $Email)) {
$html -> not_right($ubbt_lang['BAD_FORMAT'] . $Email,$Cat);
}
// --------------------------------------
// Let's see if the email domain is valid
$bademails = file ("{$config['path']}/filters/bademail");
while (list($linenum,$line) = each($bademails)) {
$line = chop($line);
if ( (preg_match("/^\n/",$line)) || (preg_match("/^\r/",$line)) || (preg_match("/^#/",$line)) || !$line ) {
continue;
}
if (@eregi($line,$Email)) {
$html -> not_right("{$ubbt_lang['BAD_EMAIL']} $line.",$Cat);
}
}
[/]
and
[]// ---------------------------------------------------------------------
// If we do not allow multiple usernames for the same email address then
// we need to see if this email address is in the database
if (!$config['multiuser'] ) {
$Email_q = addslashes($Email);
$query = "
SELECT U_Email
FROM {$config['tbprefix']}Users
WHERE U_Email = '$Email_q'
OR U_RegEmail = '$Email_q'
";
$sth = $dbh -> do_query($query);
list($emailcheck) = $dbh -> fetch_array($sth);
$dbh -> finish_sth($sth);
if($emailcheck){
$html -> not_right($ubbt_lang['NO_MULTI'],$Cat);
}
}
[/]
but just for your own info.. they should really have at least the email address listed otherwise the only other way to contact them is to try and find them by IP..
@scroungr
Thanks that has got it working straight away.
i like this mod alot b.c i can register users that used to part of my forum.
Sometimes mods people like can be simple ones
/admin/adminadduser.php needs this line added to the get_input functions:
$Verify = get_input("Verify","post");
Otherwise, depending on their register globals setting, it'll always just say that the passwords don't match.
Anyone try this with 6.3.1 ?
I have many mods and upgrading right now is not on the list of things to do.
Thanks.
Tom
Honestly I cant say. It's been so long since I played with 6.3 can't remember the specifics
Nothing admin related easily works in 6.5 given that the admin area was totally changed. Would need to be reworked a bit.
Would this be super hard to code for 6.5x?