- Joined
- Feb 27, 2003
- Messages
- 8,509
Yes, that should work to get "username" working, but then [email protected] will stop
I want both to work.. why can't uebimiau read my mind
I want both to work.. why can't uebimiau read my mind
DirectAdmin Support said:Yes, that should work to get "username" working, but then [email protected] will stop
I want both to work.. why can't uebimiau read my mind
$one_for_all_login_type = "%user%@%domain$";
$one_for_all_login_type = "%user%";
if(ereg("(.*)@(.*)",$f_email,$regs)) {
$f_user = $regs[1];
$domain = $regs[2];
if($one_for_all_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$one_for_all_login_type));
}
//if(ereg("(.*)@(.*)",$f_email,$regs)) {
// $f_user = $regs[1];
// $domain = $regs[2];
// if($one_for_all_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$one_for_all_login_type));
//}
$f_user = $f_email;
DirectAdmin Support said:yes ../users/username/domain.list
but its not readable by apache.
I'm trying a method of leaving the ereg stuff and just stomping over f_user = f_email after the if ereg {} .. so that domain willl be defined if it exists.
DirectAdmin Support said:/etc/virtual/domainowners
holds all domains and the system username associated with it.
domain.com: username
.. would have to do a reverse lookup, but its readable by all... 644
DirectAdmin Support said:wow, you really don't need to do that but if you "feel the need", by all means, be my guest.
$arrUserfile = file("/etc/virtual/domainowners");
foreach ($arrUserfile as $line) {
list($domainC, $usernameC) = explode(':', chop($line));
$usernameC = ltrim($usernameC, " ");
if($usernameC == $f_user) {
$f_domain = $domainC;
break;
}
}
DirectAdmin Support said:ok, I'll insert that. Thanks again.
DirectAdmin Support said:it wouldn't let you create that account because it does a check to make sure that you don't do that.