Populating Username Field with Domain Name

Norman Franke franke at bethzur.com
Fri Mar 3 08:08:49 CET 2006


Instead, I've replaced it with this:

   if (!strpos($user, "@")) {
         $hn = $_SERVER["HTTP_HOST"];
         $hn = preg_replace('/^www\./', '', $hn);
         $user .= "@". $hn;
   }

which will always substitute the correct username based on the server  
name. It removes the www part from the name, however.

Seems to work for me under the recently released beta.

-Norman

On Feb 28, 2006, at 4:13 AM, Richard Green wrote:

> I have implemented a botch-job just to get this working myself,
>
> In /program/include/main.inc
>
> After line 251 I added this:
>
>   if (!strpos($user, "@"))
>   {
>     $user .= "@burninghorizons.net";
>   }
>
> Replace with your domain suffix and hey presto.
>
> This would obviously be better to parameterise the domain suffix in  
> the settings file.
> Not having submitted any stuff to CVS before, can anyone point me  
> to what I need to do to submit work?
>
> Richard
>
>
> On Mon, 27 Feb 2006 17:27:48 -0800 (PST), <franke at bethzur.com> wrote:
>>
>> I second this, it would be very handy and it can be inferred from  
>> the URL.
>> Perhaps put it after the username box as static text so users know  
>> what it
>> will do.
>>
>> -Norman
>>
>>> I posted this a while back on the users list and don't recall  
>>> whether it
>>> was possible or not.
>>>
>>> I simply want the text box portion of the username field to be
>>> pre-populated with my domain name (@domainxyz.com) so my users  
>>> just have
>>> to type in their username.
>>>
>>> Is this possible?
>
>
>





More information about the Dev mailing list