/[drupal]/contributions/modules/undisposable/undisposable.module
ViewVC logotype

Diff of /contributions/modules/undisposable/undisposable.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6, Sun Dec 14 13:19:15 2008 UTC revision 1.7, Sat Sep 19 21:28:19 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: undisposable.module,v 1.5 2008/05/27 21:42:25 mustafau Exp $  // $Id: undisposable.module,v 1.6 2008/12/14 13:19:15 mustafau Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 12  Line 12 
12   */   */
13    
14  /**  /**
15   * Implementation of hook_help().   * Implement hook_help().
16   */   */
17  function undisposable_help($path, $arg) {  function undisposable_help($path, $arg) {
18    switch ($path) {    switch ($path) {
# Line 26  function undisposable_get_library() { Line 26  function undisposable_get_library() {
26  }  }
27    
28  /**  /**
29   * Implementation of hook_requirements().   * Implement hook_requirements().
30   */   */
31  function undisposable_requirements($phase) {  function undisposable_requirements($phase) {
32    $requirements = array();    $requirements = array();
# Line 52  function undisposable_requirements($phas Line 52  function undisposable_requirements($phas
52  }  }
53    
54  /**  /**
55   * Implementation of hook_user().   * Implement hook_user_validate().
56   */   */
57  function undisposable_user($type, &$edit, &$user, $category = NULL) {  function undisposable_user_validate(&$edit, $user, $category) {
58    if ($type == 'validate' && $category == 'account') {    if ($category == 'account') {
59      // Validate the e-mail address.      // Validate the e-mail address.
60      $respond = _undisposable('isDisposableEmail', $edit['mail']);      $respond = _undisposable('isDisposableEmail', $edit['mail']);
61      if (isset($respond['stat']) && $respond['stat'] == 'ok' && $respond['email']['isdisposable']) {      if (isset($respond['stat']) && $respond['stat'] == 'ok' && $respond['email']['isdisposable']) {
# Line 95  function _undisposable($op, $arg) { Line 95  function _undisposable($op, $arg) {
95        $uri .= $op;        $uri .= $op;
96    }    }
97    
98    $respond = drupal_http_request($uri . $arg, array());    $respond = drupal_http_request($uri . $arg);
99    return @unserialize($respond->data);    return @unserialize($respond->data);
100  }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2