diff options
author | till <till@php.net> | 2010-03-20 14:20:01 +0000 |
---|---|---|
committer | till <till@php.net> | 2010-03-20 14:20:01 +0000 |
commit | 63a3dc5fde5a3ceed4f03c19c5015aab19050bee (patch) | |
tree | 50aafccdad5fe36c59f10d194298c35f046afd2f /plugins/password/drivers/poppassd.php | |
parent | 0f8ff20ae2e8c949d58b9ca02bda95e388f7d142 (diff) |
moved plugins
Diffstat (limited to 'plugins/password/drivers/poppassd.php')
-rw-r--r-- | plugins/password/drivers/poppassd.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/plugins/password/drivers/poppassd.php b/plugins/password/drivers/poppassd.php deleted file mode 100644 index 8a54fb7d9..000000000 --- a/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; - } - } - } - } -} - -?> |