mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
password plugin driver for roundcube version 0.7
This commit is contained in:
parent
7aea9979c2
commit
9adb20b69c
2 changed files with 14 additions and 8 deletions
|
@ -7,9 +7,7 @@
|
||||||
* @author Serghey Rodin <skid@vestacp.com>
|
* @author Serghey Rodin <skid@vestacp.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class rcube_vesta_password
|
function password_save($curpass, $passwd)
|
||||||
{
|
|
||||||
function save($curpass, $passwd)
|
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcmail::get_instance();
|
||||||
$vesta_host = $rcmail->config->get('password_vesta_host');
|
$vesta_host = $rcmail->config->get('password_vesta_host');
|
||||||
|
@ -47,6 +45,12 @@ class rcube_vesta_password
|
||||||
$result = fread($fp, 2048);
|
$result = fread($fp, 2048);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
$fp = fopen("/tmp/roundcube.log", 'w');
|
||||||
|
fwrite($fp, "test ok");
|
||||||
|
fwrite($fp, "\n");
|
||||||
|
fclose($fp);
|
||||||
|
|
||||||
|
|
||||||
if(strpos($result, 'ok') && !strpos($result, 'error'))
|
if(strpos($result, 'ok') && !strpos($result, 'error'))
|
||||||
{
|
{
|
||||||
return PASSWORD_SUCCESS;
|
return PASSWORD_SUCCESS;
|
||||||
|
@ -56,4 +60,3 @@ class rcube_vesta_password
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
* @author Serghey Rodin <skid@vestacp.com>
|
* @author Serghey Rodin <skid@vestacp.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class rcube_vesta_password
|
function password_save($curpass, $passwd)
|
||||||
{
|
|
||||||
function save($curpass, $passwd)
|
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcmail::get_instance();
|
||||||
$vesta_host = $rcmail->config->get('password_vesta_host');
|
$vesta_host = $rcmail->config->get('password_vesta_host');
|
||||||
|
@ -47,6 +45,12 @@ class rcube_vesta_password
|
||||||
$result = fread($fp, 2048);
|
$result = fread($fp, 2048);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
$fp = fopen("/tmp/roundcube.log", 'w');
|
||||||
|
fwrite($fp, "test ok");
|
||||||
|
fwrite($fp, "\n");
|
||||||
|
fclose($fp);
|
||||||
|
|
||||||
|
|
||||||
if(strpos($result, 'ok') && !strpos($result, 'error'))
|
if(strpos($result, 'ok') && !strpos($result, 'error'))
|
||||||
{
|
{
|
||||||
return PASSWORD_SUCCESS;
|
return PASSWORD_SUCCESS;
|
||||||
|
@ -56,4 +60,3 @@ class rcube_vesta_password
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue