mirror of
https://github.com/dducret/kopano-webapp-passwd
synced 2026-07-27 18:42:47 +02:00
Kopano DB only
Adapted to Kopano WebApp 3.3.0 for DB only, not tested/fixed for LDAP
This commit is contained in:
parent
dd305cca3b
commit
ded31bd8b7
2 changed files with 14 additions and 1 deletions
|
|
@ -10,3 +10,7 @@
|
||||||
|
|
||||||
- Bug fixes for LDAP plugin
|
- Bug fixes for LDAP plugin
|
||||||
- Improved UI
|
- Improved UI
|
||||||
|
|
||||||
|
## 1.3 (14th February 2017)
|
||||||
|
|
||||||
|
- Adapted to Kopano WebApp 3.3.0 for DB only, not tested/fixed for LDAP
|
||||||
|
|
@ -199,6 +199,7 @@ class PasswdModule extends Module
|
||||||
$errorMessage = '';
|
$errorMessage = '';
|
||||||
$passwd = $data['new_password'];
|
$passwd = $data['new_password'];
|
||||||
|
|
||||||
|
/*
|
||||||
// get current session password
|
// get current session password
|
||||||
$sessionPass = $_SESSION['password'];
|
$sessionPass = $_SESSION['password'];
|
||||||
// if user has openssl module installed
|
// if user has openssl module installed
|
||||||
|
|
@ -213,6 +214,10 @@ class PasswdModule extends Module
|
||||||
$sessionPass = $_SESSION['password'];
|
$sessionPass = $_SESSION['password'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
// Get current user password
|
||||||
|
$encryptionStore = EncryptionStore::getInstance();
|
||||||
|
$sessionPass = $encryptionStore->get('password');
|
||||||
|
|
||||||
if($data['current_password'] === $sessionPass) {
|
if($data['current_password'] === $sessionPass) {
|
||||||
if ($this->checkPasswordStrenth($passwd)) {
|
if ($this->checkPasswordStrenth($passwd)) {
|
||||||
|
|
@ -223,6 +228,7 @@ class PasswdModule extends Module
|
||||||
if (mapi_zarafa_setuser($store, $userinfo['userid'], $data['username'], $userinfo['fullname'], $userinfo['emailaddress'], $passwd, 0, $userinfo['admin'])) {
|
if (mapi_zarafa_setuser($store, $userinfo['userid'], $data['username'], $userinfo['fullname'], $userinfo['emailaddress'], $passwd, 0, $userinfo['admin'])) {
|
||||||
// password changed successfully
|
// password changed successfully
|
||||||
|
|
||||||
|
/* Not able to find a way, session is discarded and user should log in again
|
||||||
// write new password to session because we don't want user to re-authenticate
|
// write new password to session because we don't want user to re-authenticate
|
||||||
session_start();
|
session_start();
|
||||||
// if user has openssl module installed
|
// if user has openssl module installed
|
||||||
|
|
@ -244,6 +250,9 @@ class PasswdModule extends Module
|
||||||
'display_message' => dgettext("plugin_passwd", 'Password is changed successfully.')
|
'display_message' => dgettext("plugin_passwd", 'Password is changed successfully.')
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
*/
|
||||||
|
// Give the session a new id
|
||||||
|
session_regenerate_id();
|
||||||
} else {
|
} else {
|
||||||
$errorMessage = dgettext("plugin_passwd", 'Password is not changed.');
|
$errorMessage = dgettext("plugin_passwd", 'Password is not changed.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue