]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/helper/web/class_WebFormHelper.php
User login (non-guest) basicly finished, news stubs added, registration and final...
[shipsimu.git] / inc / classes / main / helper / web / class_WebFormHelper.php
index 61a62434792800f2a23b179c96893868feacd3c9..6dbffb5c01a33ed1c02b32856b2140420e875b68 100644 (file)
@@ -503,7 +503,7 @@ class WebFormHelper extends BaseHelper {
                // Is a group open?
                if ($this->groupOpened === true) {
                        // Then automatically close it here
-                       $this->addFormGroup("unknown", "");
+                       $this->addFormGroup("", "");
                }
 
                // Generate the content
@@ -567,6 +567,46 @@ class WebFormHelper extends BaseHelper {
                return $required;
        }
 
+       /**
+        * Checks wether login is enabled or disabled
+        *
+        * @return      $isEnabled      Wether the login is enabled or disabled
+        */
+       public function ifLoginIsEnabled () {
+               $isEnabled = ($this->getConfigInstance()->readConfig('login_enabled') == "Y");
+               return $isEnabled;
+       }
+
+       /**
+        * Checks wether login shall be done by username
+        *
+        * @return      $isEnabled      Wether the login shall be done by username
+        */
+       public function ifLoginWithUsername () {
+               $isEnabled = ($this->getConfigInstance()->readConfig('login_type') == "username");
+               return $isEnabled;
+       }
+
+       /**
+        * Checks wether login shall be done by email
+        *
+        * @return      $isEnabled      Wether the login shall be done by email
+        */
+       public function ifLoginWithEmail () {
+               $isEnabled = ($this->getConfigInstance()->readConfig('login_type') == "email");
+               return $isEnabled;
+       }
+
+       /**
+        * Checks wether guest login is allowed
+        *
+        * @return      $isAllowed      Wether guest login is allowed
+        */
+       public function ifGuestLoginAllowed () {
+               $isAllowed = ($this->getConfigInstance()->readConfig('guest_login_allowed') == "Y");
+               return $isAllowed;
+       }
+
        /**
         * Flushs the content out (not yet secured against open forms, etc.!) or
         * throw an exception if it is not yet closed