]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/user/class_User.php
A lot more old methods deprecated and already deprecated methods removed
[shipsimu.git] / inc / classes / main / user / class_User.php
index 49b285fa7c779b43d71268faae44a93cc2978a40..6e9d8f75578546f10c5dd7c8a9094142606f575a 100644 (file)
@@ -379,6 +379,29 @@ class User extends BaseFrameworkSystem implements ManageableUser, Registerable {
                        $wrapperInstance->doUpdateByResult($this->resultInstance);
                } // END - if
        }
+
+       /**
+        * Getter for field name
+        *
+        * @param       $fieldName              Field name which we shall get
+        * @return      $fieldValue             Field value from the user
+        */
+       public function getField ($fieldName) {
+               // Default field value
+               $fieldValue = null;
+
+               // Get current array
+               $fieldArray = $this->resultInstance->current();
+
+               // Does the field exist?
+               if (isset($fieldArray[$fieldName])) {
+                       // Get it
+                       $fieldValue = $fieldArray[$fieldName];
+               } // END - if
+
+               // Return it
+               return $fieldValue;
+       }
 }
 
 // [EOF]