[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/ -> MP_privacy_.class.php (source)

   1  <?php
   2  abstract class MP_privacy_ extends MP_process_pop3_
   3  {
   4  	function __construct()
   5      {
   6          $this->config = get_option( $this->option_name );
   7          if ( !$this->config ) return;
   8  
   9          $this->requests = array( 
  10              'export_personal_data' => strtolower( $this->config['export_word'] ), 
  11              'remove_personal_data' => strtolower( $this->config['erase_word'] ), 
  12          );
  13  
  14          parent::__construct();
  15      }
  16  
  17  	function get_log_title()
  18      {
  19          return sprintf( $this->log_title, 'delete' );
  20      }
  21  
  22  	function process_message()
  23      {
  24          $this->local_log = array();
  25  
  26          if ( !$this->is_request() )
  27          {
  28              $sep = ( count( $this->local_log ) != 1 );
  29              if ( $sep ) $this->trace->log( '!' . str_repeat( '-', $this->bt ) . '!' );
  30              foreach( $this->local_log as $local_log ) $this->trace->log( $local_log );
  31              if ( $sep ) $this->trace->log( '!' . str_repeat( '-', $this->bt ) . '!' );
  32  
  33              return;
  34          }
  35  
  36          $bm  = '            !';
  37          $bm .= str_repeat( '-', $this->bt - strlen( $bm ) );
  38          $this->trace->log( '!' . $bm . '!' );
  39  
  40          $this->mysql_disconnect( $this->class );
  41          $this->mysql_connect( $this->class );
  42  
  43          $this->trace->log( '!' . str_repeat( '-', $this->bt ) . '!' );
  44  
  45          $bm = ' email      ! ' . $this->email_address;
  46          $bm .= ( $this->name_address ) ? ' ( ' . $this->name_address . ' ) ' : '';
  47          $this->trace->log( '!' . $bm . str_repeat( ' ', $this->bt - strlen( $bm ) ) . '!' );
  48  
  49          $bm = ' action     ! ' . $this->action_name;
  50          $this->trace->log( '!' . $bm . str_repeat( ' ', $this->bt - strlen( $bm ) ) . '!' );
  51  
  52          $request_id = wp_create_user_request( $this->email_address, $this->action_name );
  53  
  54          switch(true)
  55          {
  56              case ( is_wp_error( $request_id ) ) :
  57                  $bm = ' error      ! ' . $request_id->get_error_message();
  58                  $this->trace->log( '!' . $bm . str_repeat( ' ', $this->bt - strlen( $bm ) ) . '!' );
  59              break;
  60              case ( ! $request_id ) :
  61                  $bm = ' error      ! Failed to initiate confirmation request';
  62                  $this->trace->log( '!' . $bm . str_repeat( ' ', $this->bt - strlen( $bm ) ) . '!' );
  63              break;
  64              default :
  65                  wp_send_user_request( $request_id );
  66                  $bm = ' success    ! Request mail sent to user (#' . $request_id . ').';
  67                  $this->trace->log( '!' . $bm . str_repeat( ' ', $this->bt - strlen( $bm ) ) . '!' );
  68              break;
  69          }
  70  
  71          $bm  = '            !';
  72          $bm .= str_repeat( '-', $this->bt - strlen( $bm ) );
  73          $this->trace->log( '!' . $bm . '!' );
  74  
  75          $this->pop3->delete( $this->message_id );
  76      
  77          $this->trace->log( '!' . str_repeat( '-', $this->bt ) . '!' );
  78      }
  79  }


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1