Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.
Attachments
104373-adminnewuser.zip (0 Bytes, 309 downloads)

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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..

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
LOL Dont ya just love typo's

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Nice.

Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Thank you

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
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

Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Isn't headers already sent usually related to white space at after the closing tag in a language file?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Uploaded the fresh files and errors went away. Thanks

Sponsored Links
Joined: Dec 2003
Posts: 2
Lurker
Lurker
Offline
Joined: Dec 2003
Posts: 2
Is there any way to make this so it bypasses the email confirmation, so it adds them straight onto the database as active ?

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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..

Joined: Dec 2003
Posts: 2
Lurker
Lurker
Offline
Joined: Dec 2003
Posts: 2
@scroungr

Thanks that has got it working straight away.


Joined: Mar 2004
Posts: 13
Newbie
Newbie
Offline
Joined: Mar 2004
Posts: 13
i like this mod alot b.c i can register users that used to part of my forum.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Sometimes mods people like can be simple ones

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
/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.

Joined: Aug 2003
Posts: 121
Journeyman
Journeyman
Offline
Joined: Aug 2003
Posts: 121
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

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Honestly I cant say. It's been so long since I played with 6.3 can't remember the specifics

Joined: Jun 2002
Posts: 47
User
User
Offline
Joined: Jun 2002
Posts: 47
Would this work for 6.5?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Nothing admin related easily works in 6.5 given that the admin area was totally changed. Would need to be reworked a bit.

Joined: Jun 2002
Posts: 47
User
User
Offline
Joined: Jun 2002
Posts: 47
Would this be super hard to code for 6.5x?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)