1
0
Fork 0
mirror of https://github.com/silentsakky/zarafa-webapp-passwd synced 2026-07-27 18:41:08 +02:00
zarafa-webapp-passwd/php/plugin.passwd.php
Saket Patel a9549464e9 - move password checking to client side
- add flag to enable/disable strict password checking
 - use entryptionstore to store/retrieve passwords
 - remove builds directory, we will be maintaining builds using release versions
 - update documentation
2017-07-06 02:29:14 +05:30

55 lines
1.3 KiB
PHP

<?php
/**
* Passwd plugin.
*
* Allows to change user password from webapp.
*
* Author: Saket patel <silentsakky@gmail.com>
*/
class Pluginpasswd extends Plugin {
public function __construct() {}
/**
* Function initializes the Plugin and registers all hooks
*/
function init() {
$this->registerHook('server.core.settings.init.before');
}
/**
* Function is executed when a hook is triggered by the PluginManager
*
* @param string $eventID the id of the triggered hook
* @param mixed $data object(s) related to the hook
*/
function execute($eventID, &$data) {
switch($eventID) {
case 'server.core.settings.init.before' :
$this->injectPluginSettings($data);
break;
}
}
/**
* Called when the core Settings class is initialized and ready to accept sysadmin default
* settings. Registers the sysadmin defaults for the SugarCRM plugin.
* @param Array $data Reference to the data of the triggered hook
*/
function injectPluginSettings(&$data) {
$data['settingsObj']->addSysAdminDefaults(Array(
'zarafa' => Array(
'v1' => Array(
'plugins' => Array(
'passwd' => Array(
'enable' => PLUGIN_PASSWD_USER_DEFAULT_ENABLE,
'enable_strict_check' => PLUGIN_PASSWD_STRICT_CHECK_ENABLE,
)
)
)
)
));
}
}
?>