Skip to content

Commit 9adb20b

Browse files
committed
password plugin driver for roundcube version 0.7
1 parent 7aea997 commit 9adb20b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

install/debian/roundcube-driver.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
* @author Serghey Rodin <skid@vestacp.com>
88
*/
99

10-
class rcube_vesta_password
11-
{
12-
function save($curpass, $passwd)
10+
function password_save($curpass, $passwd)
1311
{
1412
$rcmail = rcmail::get_instance();
1513
$vesta_host = $rcmail->config->get('password_vesta_host');
@@ -47,6 +45,12 @@ function save($curpass, $passwd)
4745
$result = fread($fp, 2048);
4846
fclose($fp);
4947

48+
$fp = fopen("/tmp/roundcube.log", 'w');
49+
fwrite($fp, "test ok");
50+
fwrite($fp, "\n");
51+
fclose($fp);
52+
53+
5054
if(strpos($result, 'ok') && !strpos($result, 'error'))
5155
{
5256
return PASSWORD_SUCCESS;
@@ -56,4 +60,3 @@ function save($curpass, $passwd)
5660
}
5761

5862
}
59-
}

install/ubuntu/roundcube-driver.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
* @author Serghey Rodin <skid@vestacp.com>
88
*/
99

10-
class rcube_vesta_password
11-
{
12-
function save($curpass, $passwd)
10+
function password_save($curpass, $passwd)
1311
{
1412
$rcmail = rcmail::get_instance();
1513
$vesta_host = $rcmail->config->get('password_vesta_host');
@@ -47,6 +45,12 @@ function save($curpass, $passwd)
4745
$result = fread($fp, 2048);
4846
fclose($fp);
4947

48+
$fp = fopen("/tmp/roundcube.log", 'w');
49+
fwrite($fp, "test ok");
50+
fwrite($fp, "\n");
51+
fclose($fp);
52+
53+
5054
if(strpos($result, 'ok') && !strpos($result, 'error'))
5155
{
5256
return PASSWORD_SUCCESS;
@@ -56,4 +60,3 @@ function save($curpass, $passwd)
5660
}
5761

5862
}
59-
}

0 commit comments

Comments
 (0)