Previous Thread
Next Thread
Print Thread
Rate Thread
#228208 11/22/2002 10:06 AM
Joined: Nov 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 15
I am using UBBThreads on my intranet. Most of the users who will be using the boards don't have external email addresses and use our internal domain which is not a FQDN. I would like to auto-append this domain to the email when they register, so all they have to do is type in their login id.

Example: []a_user@my_company[/] would get an email to them. I would like it to append @my_company so all they would have to type in is a_user when they register.

I'm not sure if this is possible, but I would like to try it and my php skills are weak.

Has anyone done this?


Erik Burgess
Systems Engineer
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I think this will be some simple tweaking.

I'll look at the scripts when I get home this evening and post instructions here.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Just reread and realized that the domain you want to add on does NOT have a .com or .net etc.. at the end. If that's the case....


Make sure you backup the file you are going to modify, so you can put it back if it doesn't work right, or you need official support.

code:

######################
## Open adduser.php ##
######################

#
# Find this:
#

// ----------------------
// Check the email format
if (!eregi("^[0-9a-z]([-_.+]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-wyz][a-z](g|l|m|pa|t|u|v|z|fo)?$", $Email)) {
$html -> not_right($ubbt_lang['BAD_FORMAT'],$Cat);
}

#
# Change to this:
#

// ----------------------
// Check the email format
if (!eregi("^[0-9a-z]([-_.+]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*$", $Email)) {
$Email .= "@yourdomain";
}



Substitute in yourdomain.

What this does...is account for the fact that they might enter it.... []joeblow@mycompany.[/] Then it will skip it. But if they just enter joeblow.... it'll add the @mycompany on for you. That way they don't end up with []joeblow@mycompany@mycompany[/]

Hope that helps.
Let me know.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Hey Erik.. glad to see you made the right decision and got UBB.Threads

Joined: Nov 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 15
Thanks Josh! Appreciate the help!


Erik Burgess
Systems Engineer
Sponsored Links
Joined: Nov 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Nov 2002
Posts: 15
After talking to you Jeremy, how could I not go with UBB.Threads?


Erik Burgess
Systems Engineer

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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
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,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)