This commit has been accessed 956 times via Git panel.
commit 17f841339e5b633f608ae401687e2e8c32a3152f
tree b49b8bc4b8283c286a843c1ff58ba44a14972af9
parent 0ccac1a59cf04fdf22b8f11468f6bd0ff901e821
author Engels Antonio <engels@majcms.org> 1334696306 +0800
committer Engels Antonio <engels@majcms.org> 1334696306 +0800
Allow login with local-part if subdomain is mail
diff --git a/index.php b/index.php
index b6b6c66..fa14ec8 100644
--- a/index.php
+++ b/index.php
@@ -109,6 +109,11 @@ if (!is_int($id_put)) {
$lvl_put = strip_tags($_POST['lvl']);
if ($lvl_put == "subscriber") {
+
+ if (!strpos($id_put,"@")) {
+ $id_put = $id_put . "@" . trim(str_replace("mail.","",$_SERVER['SERVER_NAME']));
+ }
+
$pw_get = mysql_query("select pw from users where id='$id_put'");
}
tree b49b8bc4b8283c286a843c1ff58ba44a14972af9
parent 0ccac1a59cf04fdf22b8f11468f6bd0ff901e821
author Engels Antonio <engels@majcms.org> 1334696306 +0800
committer Engels Antonio <engels@majcms.org> 1334696306 +0800
Allow login with local-part if subdomain is mail
diff --git a/index.php b/index.php
index b6b6c66..fa14ec8 100644
--- a/index.php
+++ b/index.php
@@ -109,6 +109,11 @@ if (!is_int($id_put)) {
$lvl_put = strip_tags($_POST['lvl']);
if ($lvl_put == "subscriber") {
+
+ if (!strpos($id_put,"@")) {
+ $id_put = $id_put . "@" . trim(str_replace("mail.","",$_SERVER['SERVER_NAME']));
+ }
+
$pw_get = mysql_query("select pw from users where id='$id_put'");
}