summaryrefslogtreecommitdiff
path: root/roundcubemail/plugins/password/drivers/poppassd.php
diff options
context:
space:
mode:
authortill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-20 14:20:01 +0000
committertill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-20 14:20:01 +0000
commit8660a74501de5ee206f6c14246f7112e6ea91ad3 (patch)
tree1e67a0bcc9ebe254d6f0c21eb07728216f5b3149 /roundcubemail/plugins/password/drivers/poppassd.php
parent85de1261ba60e3df477a49a15de8471f79d2946a (diff)
moved plugins
git-svn-id: https://svn.roundcube.net/trunk@3394 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins/password/drivers/poppassd.php')
-rw-r--r--roundcubemail/plugins/password/drivers/poppassd.php56
1 files changed, 0 insertions, 56 deletions
diff --git a/roundcubemail/plugins/password/drivers/poppassd.php b/roundcubemail/plugins/password/drivers/poppassd.php
deleted file mode 100644
index 8a54fb7d9..000000000
--- a/roundcubemail/plugins/password/drivers/poppassd.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/**
- * Poppassd Password Driver
- *
- * Driver to change passwords via Poppassd/Courierpassd
- *
- * @version 1.0
- * @author Philip Weir
- *
- */
-
-function password_save($curpass, $passwd)
-{
- $rcmail = rcmail::get_instance();
-// include('Net/Socket.php');
- $poppassd = new Net_Socket();
-
- if (PEAR::isError($poppassd->connect($rcmail->config->get('password_pop_host'), $rcmail->config->get('password_pop_port'), null))) {
- return PASSWORD_CONNECT_ERROR;
- }
- else {
- $result = $poppassd->readLine();
- if(!preg_match('/^2\d\d/', $result)) {
- $poppassd->disconnect();
- return PASSWORD_ERROR;
- }
- else {
- $poppassd->writeLine("user ". $_SESSION['username']);
- $result = $poppassd->readLine();
- if(!preg_match('/^[23]\d\d/', $result) ) {
- $poppassd->disconnect();
- return PASSWORD_CONNECT_ERROR;
- }
- else {
- $poppassd->writeLine("pass ". $curpass);
- $result = $poppassd->readLine();
- if(!preg_match('/^[23]\d\d/', $result) ) {
- $poppassd->disconnect();
- return PASSWORD_ERROR;
- }
- else {
- $poppassd->writeLine("newpass ". $passwd);
- $result = $poppassd->readLine();
- $poppassd->disconnect();
- if (!preg_match('/^2\d\d/', $result))
- return PASSWORD_ERROR;
- else
- return PASSWORD_SUCCESS;
- }
- }
- }
- }
-}
-
-?>