Author |
|
arnor Newbie

Joined: 22 August 2007 Location: Taiwan
Online Status: Offline Posts: 35
|
Posted: 27 October 2007 at 4:45am | IP Logged
|
|
|
I always keep this option disabled.
But I found the accounts I am using are all not created manually in admin. I never created user account manually.
Why?
BTW, if I disable "Allow automatic registration of new users on first login" and enable "Allow advanced login",
which rule will apply? I think they are against each other. In testing, I just login to login any account I want to create them.
|
Back to Top |
|
|
Andrew AfterLogic Support

Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 29 October 2007 at 3:36am | IP Logged
|
|
|
We've sent you the fix and the explanation.
"Allow advanced login" allows or disallows users to specify/change their mail server settings during logging in.
"Allow automatic registration of new users on first login" determines if users will be automatically created in the database on first logging in.
If you have "Allow advanced login" turned on, new users will be created only if "Allow automatic registration of new users on first login" is turned on.
Best regards,
Andrew
|
Back to Top |
|
|
arnor Newbie

Joined: 22 August 2007 Location: Taiwan
Online Status: Offline Posts: 35
|
Posted: 29 October 2007 at 9:41am | IP Logged
|
|
|
Thanks for the fix.
It works now. ^^
|
Back to Top |
|
|
Extremist Newbie


Joined: 21 October 2010 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: 22 October 2010 at 7:25am | IP Logged
|
|
|
I`m using hMailServer + WebMail Pro Client,
Now i`m created a user account manualy. How a new user make a registered your
account and mail on a server and MySQL BD without my intervention That is
automatically
|
Back to Top |
|
|
Igor AfterLogic Support

Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6124
|
Posted: 25 October 2010 at 2:52am | IP Logged
|
|
|
Creating accounts on hMailServer is not supported at the moment, we're planning to add this in future.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Extremist Newbie


Joined: 21 October 2010 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: 25 October 2010 at 10:17am | IP Logged
|
|
|
Hello all
here is the script wich create a new user account into MySQL DB in a WEB
Code:
<?php
//SINGLE DOMAIN SIGNUP
//---------------------------------------
//MySQL Information:
$mysql_host = "localhost"; //Host Name
$mysql_user = "root"; //Username
$mysql_pass = "password"; //Password
$mysql_db = "hmail"; //Database
//General Configuration:
$form_title = "signup"; //Name for this form
$account_max = "10000000"; //Maximum size per account (1000000 = 1MB -> Do not
uses spaces or commas!)
$admin_notify = 1; //1 = yes & 0 = no
$admin_email = "admin@oldgamer.org"; //Administrators email to send
notifications)
$admin_default_activate = 1; //1 = yes & 0 = no -> If no, the administrator has
to authorise the account
$encryption = 2; //Password encryption level
$url = $_SERVER["HTTP_HOST"];
$domain = $_SERVER["HTTP_HOST"];
if (substr($domain,0,4) == "www.")
{
$domain = strstr($domain, ".");
$domain = substr($domain, 1);
}
// Protect the Database and MD5 the password.
$strName = addslashes( $_POST['name'] );
$strUser = addslashes( $_POST['user'] );
$strDomain = addslashes( $_POST['domain'] );
$strPass1 = addslashes( $_POST['pass1'] );
$strMD5Pass = md5( $strPass1 );
error_reporting(E_ALL ^ E_NOTICE);
//Next two lines connect to database using information from above.
$open = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
$select = mysql_select_db($mysql_db);
IF (!$open || !$select)
{
echo "Unable to open database, contact your administrator!";
}
ELSE
{
echo "<font size=\"+2\">$form_title</font><br><br>" ; //Display form title
from above
//Decide On What Path To Take
SWITCH ($_GET['mode'])
{
CASE "do":
//#### PAGE IF FORM FILLED OUT ####//
$q=mysql_query("SELECT * FROM `hm_domains` WHERE `domainid` =
'{$strDomain}' LIMIT 1"); //Load Domain Into memory (internal use)
WHILE ($v=mysql_fetch_array($q))
{
$temp_domain = $v['1'];
} //Apply information
$q2=mysql_query("SELECT * FROM `hm_accounts` WHERE `accountaddress` =
'{$strUser}@$temp_domain' LIMIT 1"); //Check if account exists
$v2=mysql_num_rows($q2); //Gets number of accounts that exist with that
profile (should be less than or equal to one)
IF ($v2 == 1)
{
echo "A user with this username already exists! <a
href=\"javascript:history.go(-1)\">Go Back</a>";
}
ELSE
{
IF (!$_POST['pass1'] || !$_POST['pass2'])
{
echo "You did not enter both passwords! <a
href=\"javascript:history.go(-1)\">Go Back</a>";
}
ELSEIF ($_POST['pass1'] <> $_POST['pass2'])
{
echo "Your passwords do not match! <a
href=\"javascript:history.go(-1)\">Go Back</a>";
}
ELSE
{
$q3=mysql_query("INSERT INTO `hm_accounts`
(`accountdomainid`,`accountaddress`,`accountpassword`,`accou ntactive`,`accountis
ad`,`accountmaxsize`,`accountpwencryption`) VALUES
('$strDomain','$strUser@$temp_domain','$strMD5Pass','$admin_ default_activate','0
','$account_max','$encryption')") or die(mysql_error());
}
}
IF ($q3)
{
IF ($admin_default_activate == 0)
{
echo "Your account has been created <b>however requires
administrator activation.</b> You should receive a message soon regarding
this.";
}
ELSE
{
echo "Your account has been created and is ready for
use!<br><br>Username: $strUser@$temp_domain<br><br>Webmail: <a
href=\"$serv_webmail/mail\">www.$temp_domain/mail</a&g t;<br>POP3:
mail.$temp_domain<br>IMAP: mail.$temp_domain<br><br>SMTP: mail.$temp_domain";
$subject = "Welcome To MYWEBSITE!";
$message = "This is confirmation that your account has been
created.";
mail("{$_POST['user']}@$temp_domain", $subject, $message);
//Send welcome message
}
}
ELSE
{
echo "Database error, unable to add account. Please contact your
administrator!";
}
IF ($admin_default_activate == 0 && $admin_notify == 0)
{
$admin_mail_subject = "Account Requires Activation!";
$admin_mail_message = "{$_POST['user']}@$temp_domain has been
created by {$_POST['name']} and needs to be activated!";
mail($admin_email, $admin_mail_subject, $admin_mail_message);
}
ELSEIF ($admin_default_activate == 1 && $admin_notify == 1)
{
$admin_mail_subject = "New Account Created!";
$admin_mail_message = "{$_POST['user']}@$temp_domain has been
created by {$_POST['name']}!";
mail($admin_email, $admin_mail_subject, $admin_mail_message);
}
ELSEIF ($admin_default_activate == 1 && $admin_notify == 1)
{
$admin_mail_subject = "New Account Created!";
$admin_mail_message = "{$_POST['user']}@$temp_domain has been
created by {$_POST['name']}!";
mail($admin_email, $admin_mail_subject, $admin_mail_message);
}
ELSEIF ($admin_default_activate == 0 && $admin_notify == 1)
{
$admin_mail_subject = "New Account Created!";
$admin_mail_message = "{$_POST['user']}@$temp_domain has been
created by {$_POST['name']}!";
mail($admin_email, $admin_mail_subject, $admin_mail_message);
}
break;
DEFAULT:
}
}
//#### MAIN PAGE IF FORM NOT FILLED OUT ####//
echo "
<form action=\"?mode=do\" method=\"POST\">
Your Name: <input type=\"text\" name=\"name\" size=\"21\"><br>
E-Mail: <input type=\"text\" name=\"user\" size=\"21\"> @ <select
name=\"domain\">
";
$q2=mysql_query("SELECT * FROM `hm_domains` WHERE `domainactive` = '1' ORDER BY
`domainname` DESC"); //Load avaliable domains into memory
WHILE ($v2=mysql_fetch_array($q2)) //Display avaliable domains
{
echo "<option value=\"{$v2['0']}\">$domain</option>";
}
echo "
</select><br>
Password: <input type=\"password\" name=\"pass1\" size=\"21\"><br>
Password: <input type=\"password\" name=\"pass2\" size=\"21\"> (For
Confirmation)<br><br>
<input type=\"submit\" value=\"Create Account\">
</form>
";
?>
|
|
|
but after creating account and logining new user webmail popup this message
Code:
Wrong email/login and/or password. Authentication failed. |
|
|
But the user all the same login and also can use a mailbox
|
Back to Top |
|
|
Extremist Newbie


Joined: 21 October 2010 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: 25 October 2010 at 10:20am | IP Logged
|
|
|
OOops! pls delet my pesonal MySQl account information ))) i cant correct it
|
Back to Top |
|
|
Extremist Newbie


Joined: 21 October 2010 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: 25 October 2010 at 10:40am | IP Logged
|
|
|
Pop3 account is created. Password is correct.
But telling me username and pass is incorrect, and it is.
Wrong email/login and/or password. Authentication failed.
|
Back to Top |
|
|