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


PHP SoapClient::mail_user_get方法代码示例

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


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

示例1: _getUserDetails

 /**
  * Retrieves the current vacation details for the user.
  *
  * @param string $password  The password for user.
  *
  * @return array  Vacation details
  * @throws Ingo_Exception
  */
 protected function _getUserDetails($password)
 {
     if (!is_null($this->_details)) {
         return $this->_details;
     }
     $this->_checkConfig();
     $this->_connect();
     try {
         $users = $this->_soap->mail_user_get($this->_soap_session, array('login' => $this->_params['username']));
     } catch (SoapFault $e) {
         throw new Ingo_Exception($e);
     }
     if (count($users) != 1) {
         throw new Ingo_Exception(sprintf(_("%d users with login %s found, one expected."), count($users), $this->_params['username']));
     }
     $user = $users[0];
     $this->_details['vacation'] = $user['autoresponder'] === 'y' ? 'Y' : 'N';
     $this->_details['message'] = $user['autoresponder_text'];
     $this->_details['mailuser_id'] = $user['mailuser_id'];
     // 0 == admin
     $this->_details['client_id'] = 0;
     $this->_details['autoresponder_start_date'] = $user['autoresponder_start_date'];
     $this->_details['autoresponder_end_date'] = $user['autoresponder_end_date'];
     return $this->_details;
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:33,代码来源:Ispconfig.php

示例2: loadData

 protected function loadData()
 {
     $client = new SoapClient(null, array('location' => SOAP_LOCATION, 'uri' => SOAP_URI));
     try {
         //* Login to the remote server
         if ($session_id = $client->login(SOAP_USER, SOAP_PASS)) {
             $mail_user = $client->mail_user_get($session_id, array('email' => $this->email));
             if (count($mail_user) == 1) {
                 $this->host = $client->server_get($session_id, $mail_user[0]['server_id'], 'server');
                 $this->user = $mail_user[0];
             } else {
                 throw new Exception("Unknown Account");
             }
         }
         //* Logout
         $client->logout($session_id);
     } catch (SoapFault $e) {
         throw new Exception('SOAP Error: ' . $e->getMessage());
     }
 }
开发者ID:0x15e,项目名称:isp-mailConfig,代码行数:20,代码来源:AutoConfig.php

示例3: _changePassword

 /**
  */
 protected function _changePassword($user, $oldpass, $newpass)
 {
     // Connect
     $soap_uri = $this->_params['soap_uri'];
     $client = new SoapClient(null, array('location' => $soap_uri . 'index.php', 'uri' => $soap_uri));
     // Login
     try {
         if (!($session_id = $client->login($this->_params['soap_user'], $this->_params['soap_pass']))) {
             throw new Passwd_Exception(sprintf(_("Login to %s failed."), $soap_uri));
         }
     } catch (SoapFault $e) {
         throw new Passwd_Exception($e);
     }
     // Get user information
     try {
         $users = $client->mail_user_get($session_id, array('login' => $user));
     } catch (SoapFault $e) {
         throw new Passwd_Exception($e);
     }
     if (count($users) != 1) {
         throw new Passwd_Exception(sprintf(_("%d users with login %s found, one expected."), count($users), $user));
     }
     $user = $users[0];
     // Check the passwords match
     $this->_comparePasswords($user['password'], $oldpass);
     // Set new password
     $user['password'] = $newpass;
     // Save information
     try {
         $client->mail_user_update($session_id, $user['client_id'], $user['mailuser_id'], $user);
     } catch (SoapFault $e) {
         throw new Passwd_Exception($e);
     }
     // Logout
     try {
         $client->logout($session_id);
     } catch (SoapFault $e) {
         throw new Passwd_Exception($e);
     }
 }
开发者ID:horde,项目名称:horde,代码行数:42,代码来源:Ispconfig.php

示例4: save

 function save()
 {
     $confirm = $this->rcmail_inst->config->get('password_confirm_current');
     if ($confirm && !isset($_POST['_curpasswd']) || !isset($_POST['_newpasswd'])) {
         $this->rcmail_inst->output->command('display_message', $this->gettext('nopassword'), 'error');
     } else {
         $curpwd = rcube_utils::get_input_value('_curpasswd', RCUBE_INPUT_POST);
         $newpwd = rcube_utils::get_input_value('_newpasswd', RCUBE_INPUT_POST);
         $pwl = $this->rcmail_inst->config->get('password_min_length');
         $checkUpper = $this->rcmail_inst->config->get('password_check_upper');
         $checkLower = $this->rcmail_inst->config->get('password_check_lower');
         $checkSymbol = $this->rcmail_inst->config->get('password_check_symbol');
         $checkNumber = $this->rcmail_inst->config->get('password_check_number');
         $error = false;
         if (!empty($pwl)) {
             $pwl = max(6, $pwl);
         } else {
             $pwl = 6;
         }
         if ($confirm && $this->rcmail_inst->decrypt($_SESSION['password']) != $curpwd) {
             $this->rcmail_inst->output->command('display_message', $this->gettext('passwordincorrect'), 'error');
         } else {
             if (strlen($newpwd) < $pwl) {
                 $error = true;
                 $this->rcmail_inst->output->command('display_message', str_replace("%d", $pwl, $this->gettext('passwordminlength')), 'error');
             }
             if (!$error && $checkNumber && !preg_match("#[0-9]+#", $newpwd)) {
                 $error = true;
                 $this->rcmail_inst->output->command('display_message', $this->gettext('passwordchecknumber'), 'error');
             }
             if (!$error && $checkLower && !preg_match("#[a-z]+#", $newpwd)) {
                 $error = true;
                 $this->rcmail_inst->output->command('display_message', $this->gettext('passwordchecklower'), 'error');
             }
             if (!$error && $checkUpper && !preg_match("#[A-Z]+#", $newpwd)) {
                 $error = true;
                 $this->rcmail_inst->output->command('display_message', $this->gettext('passwordcheckupper'), 'error');
             }
             if (!$error && $checkSymbol && !preg_match("#\\W+#", $newpwd)) {
                 $error = true;
                 $this->rcmail_inst->output->command('display_message', $this->gettext('passwordchecksymbol'), 'error');
             }
             if (!$error) {
                 try {
                     $soap = new SoapClient(null, array('location' => $this->rcmail_inst->config->get('soap_url') . 'index.php', 'uri' => $this->rcmail_inst->config->get('soap_url')));
                     $session_id = $soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
                     $mail_user = $soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
                     $params = $mail_user[0];
                     $startdate = array('year' => substr($params['autoresponder_start_date'], 0, 4), 'month' => substr($params['autoresponder_start_date'], 5, 2), 'day' => substr($params['autoresponder_start_date'], 8, 2), 'hour' => substr($params['autoresponder_start_date'], 11, 2), 'minute' => substr($params['autoresponder_start_date'], 14, 2));
                     $enddate = array('year' => substr($params['autoresponder_end_date'], 0, 4), 'month' => substr($params['autoresponder_end_date'], 5, 2), 'day' => substr($params['autoresponder_end_date'], 8, 2), 'hour' => substr($params['autoresponder_end_date'], 11, 2), 'minute' => substr($params['autoresponder_end_date'], 14, 2));
                     $params['password'] = $newpwd;
                     $params['autoresponder_end_date'] = $enddate;
                     $params['autoresponder_start_date'] = $startdate;
                     $uid = $soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
                     $update = $soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params);
                     $soap->logout($session_id);
                     $this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
                     $_SESSION['password'] = $this->rcmail_inst->encrypt($newpwd);
                     $this->rcmail_inst->user->data['password'] = $_SESSION['password'];
                 } catch (SoapFault $e) {
                     $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
                 }
             }
         }
     }
     $this->init_html();
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:67,代码来源:ispconfig3_pass.php

示例5: SoapClient

<?php

require 'soap_config.php';
$client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri, 'trace' => 1, 'exceptions' => 1));
try {
    if ($session_id = $client->login($username, $password)) {
        echo 'Logged successfull. Session ID:' . $session_id . '<br />';
    }
    //* Set the function parameters.
    $mailuser_id = 1;
    $app = $client->mail_user_get($session_id, $mailuser_id);
    print_r($app);
    if ($client->logout($session_id)) {
        echo 'Logged out.<br />';
    }
} catch (SoapFault $e) {
    echo $client->__getLastResponse();
    die('SOAP Error: ' . $e->getMessage());
}
开发者ID:falkbizz,项目名称:ispconfig3,代码行数:19,代码来源:mail_user_get.php

示例6: SoapClient

<?php

require 'soap_config.php';
$client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri, 'trace' => 1, 'exceptions' => 1));
try {
    if ($session_id = $client->login($username, $password)) {
        echo 'Logged successfull. Session ID:' . $session_id . '<br />';
    }
    //* Parameters
    $mailuser_id = 1;
    $client_id = 1;
    //* Get the email user record
    $mail_user_record = $client->mail_user_get($session_id, $mailuser_id);
    //* Change the status to inactive
    $mail_user_record['name'] = 'hmmyea';
    $affected_rows = $client->mail_user_update($session_id, $client_id, $mailuser_id, $mail_user_record);
    echo "Number of records that have been changed in the database: " . $affected_rows . "<br>";
    if ($client->logout($session_id)) {
        echo 'Logged out.<br />';
    }
} catch (SoapFault $e) {
    echo $client->__getLastResponse();
    die('SOAP Error: ' . $e->getMessage());
}
开发者ID:falkbizz,项目名称:ispconfig3,代码行数:24,代码来源:mail_user_update.php


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