function testValue($sValue) { //check that user exists try { $oUser = AnwUsers::getUserByLogin($sValue); unset($oUser); } catch (AnwException $e) { $sError = AnwComponent::g_editcontent("err_contentfield_user_notfound"); throw new AnwInvalidContentFieldValueException($sError); } }