UBB.Dev
Posted By: omegatron Beta-[6.4] Add New Users via Admin Panel - 01/08/2004 6:48 PM
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.


Attached File
104373-adminnewuser.zip  (309 downloads)
Posted By: scroungr Re: Beta-[6.4] Add New Users via Admin Panel - 01/08/2004 7:10 PM
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
Posted By: scroungr Re: Beta-[6.4] Add New Users via Admin Panel - 01/08/2004 7:20 PM
Posted By: JoshPet Re: Beta-[6.4] Add New Users via Admin Panel - 01/09/2004 10:31 AM
Nice.
Posted By: smilesforu Re: Beta-[6.4] Add New Users via Admin Panel - 01/09/2004 11:22 AM
Thank you
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
Posted By: slayer60 Re: Beta-[6.4] Add New Users via Admin Panel - 01/15/2004 5:03 PM
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
Posted By: Phoenix Re: Beta-[6.4] Add New Users via Admin Panel - 03/12/2004 3:21 PM
Is there any way to make this so it bypasses the email confirmation, so it adds them straight onto the database as active ?
Posted By: scroungr Re: Beta-[6.4] Add New Users via Admin Panel - 03/12/2004 3:35 PM
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..
Posted By: Phoenix Re: Beta-[6.4] Add New Users via Admin Panel - 03/15/2004 11:45 AM
@scroungr

Thanks that has got it working straight away.

Posted By: Critical Re: Beta-[6.4] Add New Users via Admin Panel - 03/16/2004 9:26 PM
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
Posted By: JoshPet Re: Beta-[6.4] Add New Users via Admin Panel - 04/01/2004 9:02 PM
/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.
Posted By: Tom_H Re: Beta-[6.4] Add New Users via Admin Panel - 04/23/2004 11:12 AM
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
Posted By: UnixSpot Re: Beta-[6.4] Add New Users via Admin Panel - 01/04/2005 8:45 PM
Would this work for 6.5?
Posted By: JoshPet Re: Beta-[6.4] Add New Users via Admin Panel - 01/05/2005 6:57 AM
Nothing admin related easily works in 6.5 given that the admin area was totally changed. Would need to be reworked a bit.
Posted By: UnixSpot Re: Beta-[6.4] Add New Users via Admin Panel - 04/28/2005 8:24 PM
Would this be super hard to code for 6.5x?
© UBB.Developers