diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-03-31 12:25:48 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-03-31 12:25:48 +0000 |
| commit | e6d8f97bf2e0bbb4d95df0c4e030eb7ec6ef75a5 (patch) | |
| tree | 4f6fdadb51cbe1a2bb3b2b06c9bcabb0429d1a84 /plugins/password/drivers/domainfactory.php | |
| parent | 868c169e2a64c1d19a9b6bbcd98f268808dfd173 (diff) | |
Move plugins repository into roundcubemail root folder; svn:externals are not defined anymore
git-svn-id: https://svn.roundcube.net/trunk@6034 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password/drivers/domainfactory.php')
| -rw-r--r-- | plugins/password/drivers/domainfactory.php | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php deleted file mode 100644 index 7f6b8860e..000000000 --- a/plugins/password/drivers/domainfactory.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/** - * domainFACTORY Password Driver - * - * Driver to change passwords with the hosting provider domainFACTORY. - * See: http://www.df.eu/ - * - * @version 2.0 - * @author Till Krüss <me@tillkruess.com> - * @link http://tillkruess.com/projects/roundcube/ - * - */ - -class rcube_domainfactory_password -{ - function save($curpass, $passwd) - { - $rcmail = rcmail::get_instance(); - - if (is_null($curpass)) { - $curpass = $rcmail->decrypt($_SESSION['password']); - } - - if ($ch = curl_init()) { - // initial login - curl_setopt_array($ch, array( - CURLOPT_RETURNTRANSFER => true, - CURLOPT_URL => 'https://ssl.df.eu/chmail.php', - CURLOPT_POST => true, - CURLOPT_POSTFIELDS => array( - 'login' => $rcmail->user->get_username(), - 'pwd' => $curpass, - 'action' => 'change' - ) - )); - - if ($result = curl_exec($ch)) { - // login successful, get token! - $postfields = array( - 'pwd1' => $passwd, - 'pwd2' => $passwd, - 'action[update]' => 'Speichern' - ); - - preg_match_all('~<input name="(.+?)" type="hidden" value="(.+?)">~i', $result, $fields); - foreach ($fields[1] as $field_key => $field_name) { - $postfields[$field_name] = $fields[2][$field_key]; - } - - // change password - $ch = curl_copy_handle($ch); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); - if ($result = curl_exec($ch)) { - if (strpos($result, 'Einstellungen erfolgreich') !== false) { - return PASSWORD_SUCCESS; - } - } else { - return PASSWORD_CONNECT_ERROR; - } - } else { - return PASSWORD_CONNECT_ERROR; - } - } else { - return PASSWORD_CONNECT_ERROR; - } - - return PASSWORD_ERROR; - } -} |
