当前位置: 首页>>代码示例>>PHP>>正文


PHP valid::email_domain方法代码示例

本文整理汇总了PHP中valid::email_domain方法的典型用法代码示例。如果您正苦于以下问题:PHP valid::email_domain方法的具体用法?PHP valid::email_domain怎么用?PHP valid::email_domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在valid的用法示例。


在下文中一共展示了valid::email_domain方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: valid_email_domain_test

 public function valid_email_domain_test()
 {
     // not implemented on windows platform
     $var1 = EIGHT_IS_WIN ? TRUE : valid::email_domain('address@gmail.tld');
     $var2 = EIGHT_IS_WIN ? FALSE : valid::email_domain('address@domain-should_not-exist.tld');
     $this->assert_true_strict($var1)->assert_false_strict($var2);
 }
开发者ID:enormego,项目名称:EightPHP,代码行数:7,代码来源:validhelper.php

示例2: email_domain

 /**
  * Tests the valid::email_domain() function.
  * @dataProvider email_domain_provider
  * @group core.helpers.valid.email_domain
  * @test
  */
 public function email_domain($input_email, $expected_result)
 {
     if (!function_exists('checkdnsrr')) {
         $this->markTestSkipped('checkdnsrr() is missing from your install.');
     }
     $result = valid::email_domain($input_email);
     $this->assertEquals($expected_result, $result);
 }
开发者ID:swk,项目名称:bluebox,代码行数:14,代码来源:Helper_Valid_Test.php

示例3: register

 /**
  * Enregistrement d'un utilisateur.
  *
  * @return  void
  */
 public function register()
 {
     if (Auth::instance()->logged_in()) {
         return url::redirect(cookie::get('urlAdminUrl') . '?msg=' . urlencode(Kohana::lang('logger.identify')));
     } elseif ($_POST) {
         $username = $this->input->post('username');
         $password = $this->input->post('password');
         $tmpUsername = explode('@', $username);
         $tmpUsername = $tmpUsername[0];
         $user = ORM::factory('user', $username);
         if (!$username || !$password) {
             $txt = Kohana::lang('logger.error_all_form');
         } elseif (!valid::email($username) || !valid::email_domain($username) || !valid::email_rfc($username)) {
             $txt = Kohana::lang('logger.error_mail_valid');
         } elseif (User_Model::verification_mail($username)) {
             $txt = Kohana::lang('logger.exist_email');
         } elseif ($user->loaded) {
             $txt = Kohana::lang('logger.exist_username');
         } elseif ($user->insert(array('username' => $tmpUsername, 'x' => Kohana::config('game.initialPosition.x'), 'y' => Kohana::config('game.initialPosition.y'), 'z' => Kohana::config('game.initialPosition.z'), 'region_id' => Kohana::config('game.initialPosition.region'), 'speed' => Kohana::config('game.initialSpeed'), 'gravity' => Kohana::config('game.initialGravity'), 'password' => Auth::instance()->hash_password($password), 'last_login' => date::Now(), 'argent' => 0, 'hp' => Kohana::config('game.initialHP'), 'hp_max' => Kohana::config('game.initialHP'), 'email' => $username, 'ip' => $_SERVER['REMOTE_ADDR']))) {
             Auth::instance()->login($username, $password);
             $from = Kohana::config('game.name') . ' <' . Kohana::config('email.from') . '>';
             $subject = Kohana::lang('logger.title_mail_register', Kohana::config('game.name'));
             $message = Kohana::lang('logger.content_mail_register', $username, $username, $password);
             email::send($username, $from, $subject, $message, TRUE);
             return url::redirect('?msg=' . urlencode(Kohana::lang('logger.identify')));
         } else {
             $txt = Kohana::lang('logger.error_register');
         }
     } else {
         $txt = Kohana::lang('logger.no_acces');
     }
     return self::redirection($txt);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:38,代码来源:logger.php


注:本文中的valid::email_domain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。