lifetype 註冊增加帳號判斷
學校老師說想教學生使用 blog ,架 lifetype 不難,可是如何管制學生 blog 的申請有點痳煩,要判斷是否本校學生,及可以用帳號辨別學生,後來想到用學生的Email 帳號來當做使用者帳號,可是在註冊時加入 Email 帳號的判斷一直不是很順,因為只能在 register.php 中直接判斷,而無法加入在class物件,讓判斷含在lifetype的樣本中,好像lifetype本來就有的功能一樣,看來有空要好好研究 lifetype 的程式,以下是暫時的笨方法
//在 register.php 內加入下面指令
//判斷是否是 mail 的帳號,利用 imap_open 判斷是否有email 帳號
function chkUser($host,$user,$passwd)
{
@$mbox = imap_open("{".$host.":110/pop3/notls}",$user,$passwd);
return $mbox;
}
$mRequest = HttpVars::getRequest();
if($mRequest['Register'])
{
if(!chkUser("mail.xxx.edu.tw",$mRequest['userName'],$mRequest['userPassword']))
{
header('Content-Type:text/html;charset=utf-8');
die("不是Email的帳號密碼 <input type=button value='返回上一頁' onclick=history.back()>");
//如果不是email帳號會單獨秀上一行,很不協調
}
}
//================================================================================
//加入上面的指令
// and the registration/sequential controller
$r = new RegistrationController();
$r->process( HttpVars::getRequest());
迴響
lifetype 註冊增加帳號判斷 | 豬窩
For the reason that the admin of this website is working, no hesitation very rapidly it will be renowned, due to its quality contents.
lifetype 註冊增加帳號判斷 | 豬窩
Cbd oil that works 2020
I do not even know how I ended up here, but I
thought this post was great. I do not know who
you are but certainly you are going to a famous blogger if
you are not already ;) Cheers! best rated cbd oil http://j.mp/3drY6lE cbd oil that works 2020 http://j.mp/3drY6lE
lifetype 註冊增加帳號判斷 | 豬窩
I visited multiple web sites but the audio quality for audio
songs current at this website is really fabulous.
lifetype 註冊增加帳號判斷 | 豬窩 | 2
Онлайн фильм смотреть Менталист посмотреть в хорошем качестве онлайн
Смотреть фильмы, сериалы,
мультфильмы, шоу, передачи онлайн
lifetype 註冊增加帳號判斷 | 豬窩 | 2
Hey! Do you know if they make any plugins
to safeguard against hackers? I'm kinda paranoid about losing everything I've worked
hard on. Any suggestions?