コード例 #1
0
 /**
  * Verify user email.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.3
  * @uses   FS_Api
  */
 private function verify_email()
 {
     $this->_handle_account_user_sync();
     if ($this->_user->is_verified()) {
         return;
     }
     $api = $this->get_api_site_scope();
     $result = $api->call("/users/{$this->_user->id}/verify.json", 'put', array('after_email_confirm_url' => $this->_get_admin_page_url('account', array('fs_action' => 'sync_user'))));
     if (!isset($result->error)) {
         $this->_admin_notices->add(sprintf(__fs('verification-email-sent-message', $this->_slug), sprintf('<a href="mailto:%1s">%2s</a>', esc_url($this->_user->email), $this->_user->email)));
     } else {
         // handle different error cases.
     }
 }
コード例 #2
0
ファイル: class-freemius.php プロジェクト: kitchenseeker/www
 /**
  * Verify user email.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.3
  * @uses   FS_Api
  */
 private function _verify_email()
 {
     $this->_handle_account_user_sync();
     if ($this->_user->is_verified()) {
         return;
     }
     $api = $this->get_api_site_scope();
     $result = $api->call("/users/{$this->_user->id}/verify.json", 'put', array('after_email_confirm_url' => $this->_get_admin_page_url('account', array('fs_action' => 'sync_user'))));
     if (!isset($result->error)) {
         $this->_admin_notices->add(sprintf(__('Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.', WP_FS__SLUG), sprintf('<a href="mailto:%1s">%2s</a>', esc_url($this->_user->email), $this->_user->email)));
     } else {
         // handle different error cases.
     }
 }