From d607532549fcc8f5ff35031fda002558e990063a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Nov 2010 07:28:34 +0000 Subject: [PATCH] Updated registration class -Added additional functions, sever accessibility aso. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20213 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_GOsaRegistration.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gosa-core/include/class_GOsaRegistration.inc b/gosa-core/include/class_GOsaRegistration.inc index 7609fe5ee..cdb78ce22 100644 --- a/gosa-core/include/class_GOsaRegistration.inc +++ b/gosa-core/include/class_GOsaRegistration.inc @@ -12,6 +12,8 @@ class GOsaRegistration function __construct(&$config) { + // Check if we're registrated + $this->config = $config; } @@ -41,12 +43,28 @@ class GOsaRegistration } } + function registrationNotWanted() + { + // Check if the registration process was postponed or completely(>=0) canceled (-1) + $date = $this->config->configRegistry->getPropertyValue('GOsaRegistration','askForRegistration'); + return($date == -1); + } + function registrationRequired() { + // If we are already registered, then do not ask for regsitration again + if(!empty($this->config->instancePassword)) return(FALSE); + + // Seems that we haven't received an instancePassword yet, this can has two reasons: + // 1. Not registered yet or registration postponed 2. We do not want to registrate our instance. $date = $this->config->configRegistry->getPropertyValue('GOsaRegistration','askForRegistration'); if($date == -1){ + + // We do not want to registrate return(FALSE); }else{ + + // Registration may be postponed. return($date < time()); } } -- 2.30.2