Ms7 Search
Google 搜尋 翻譯
calendar
« 九月 2024 »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
近期文章
文章分類
網站連結
Syndicate

« | »

lifetype 註冊增加帳號判斷

2008-09-19 @ 20:51 in LifeType,Moodle

學校老師說想教學生使用 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.

作者 g take @ 00:05, 2020-06-22

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

作者 http://j.mp/3drY6lE @ 09:30, 2020-06-25

lifetype 註冊增加帳號判斷 | 豬窩

I visited multiple web sites but the audio quality for audio
songs current at this website is really fabulous.

作者 best web hosting 2020 @ 13:46, 2020-08-10

lifetype 註冊增加帳號判斷 | 豬窩 | 2

Онлайн фильм смотреть Менталист посмотреть в хорошем качестве онлайн
Смотреть фильмы, сериалы,
мультфильмы, шоу, передачи онлайн

作者 Менталист @ 16:19, 2020-08-14

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?

作者 Room And Board Clearance @ 20:43, 2022-10-13
«上一篇   1 2 3
發表迴響
 authimage