X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fuser%2Fclass_BaseUser.php;h=ce67c061f9128cbde18ffbbae13484eb093e6698;hp=8202c6e131c353adf16f6d585180ce84ac11b647;hb=cbd2f71aee1c3daca3d11acc346c79757852316f;hpb=66e68715d3d5a5e7fd5a3046471914ef3f9dd4b4 diff --git a/inc/classes/main/user/class_BaseUser.php b/inc/classes/main/user/class_BaseUser.php index 8202c6e1..ce67c061 100644 --- a/inc/classes/main/user/class_BaseUser.php +++ b/inc/classes/main/user/class_BaseUser.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -330,6 +330,32 @@ class BaseUser extends BaseFrameworkSystem implements Updateable { // Remember the update in database result $this->getResultInstance()->add2UpdateQueue($updateInstance); } + + /** + * Checks whether the user status is 'confirmed' + * + * @return $isConfirmed Whether the user status is 'confirmed' + */ + public function isConfirmed () { + // Determine it + $isConfirmed = ($this->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) == $this->getConfigInstance()->getConfigEntry('user_status_confirmed')); + + // Return it + return $isConfirmed; + } + + /** + * Checks whether the user status is 'guest' + * + * @return $isGuest Whether the user status is 'guest' + */ + public function isGuest () { + // Determine it + $isGuest = ($this->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) == $this->getConfigInstance()->getConfigEntry('user_status_guest')); + + // Return it + return $isGuest; + } } // [EOF]