From: hickert Date: Wed, 24 Aug 2011 08:03:54 +0000 (+0000) Subject: Only generate password proposals when they are needed X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3ffbe7e420eac74a079db060017898ea6f7a06ca;p=gosa.git Only generate password proposals when they are needed git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@20974 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc index 2ff63b318..e73d41492 100644 --- a/gosa-core/plugins/personal/password/class_password.inc +++ b/gosa-core/plugins/personal/password/class_password.inc @@ -29,6 +29,7 @@ class password extends plugin var $proposal = ""; var $proposalEnabled = FALSE; var $proposalSelected = FALSE; + var $proposalInitialized = FALSE; var $forcedHash = NULL; @@ -37,12 +38,6 @@ class password extends plugin { plugin::plugin($config, $dn, $parent); - // Try to generate a password proposal, if this is successfull - // then preselect the proposal usage. - $this->refreshProposal(); - if($this->proposal != ""){ - $this->proposalSelected = TRUE; - } } function forceHash($hash) @@ -58,6 +53,16 @@ class password extends plugin function execute() { + // Try to generate a password proposal, if this is successfull + // then preselect the proposal usage. + if(!$this->proposalInitialized){ + $this->refreshProposal(); + if($this->proposal != ""){ + $this->proposalSelected = TRUE; + } + $this->proposalInitialized = TRUE; + } + plugin::execute(); $smarty = get_smarty(); $smarty->assign("usePrototype", "true");