/**
  * Validates the passed chunk of data.
  * In most cases, this'll be a string-object.
  *
  * @param string $objValue
  * @return bool
  */
 public function validate($objValue)
 {
     if (!parent::validate($objValue)) {
         return false;
     }
     //check if the user or usergroup exists
     $objUser = new class_module_user_user($objValue);
     $objUserGroup = new class_module_user_group($objValue);
     if ($objUser->getStrUsername() == "" && $objUserGroup->getStrName() == "") {
         return false;
     }
     if ($objUser->getIntDeleted() == 1) {
         return false;
     }
     return true;
 }
 /**
  * Returns the fully featured user-instance created by the matching subsystem.
  *
  * @param class_module_user_user $objLeightweightUser
  *
  * @throws class_exception
  * @return interface_usersources_user
  */
 public function getSourceUser(class_module_user_user $objLeightweightUser)
 {
     if ($objLeightweightUser->getIntDeleted() == 1) {
         throw new class_exception("User was deleted, source user no longer available", class_exception::$level_ERROR);
     }
     $objSubsystem = $this->getUsersource($objLeightweightUser->getStrSubsystem());
     $objPlainUser = $objSubsystem->getUserById($objLeightweightUser->getSystemid());
     return $objPlainUser;
 }