$screenName = ''; // set this to what the user entered if ($modx->getCount('userData', array('screenName' => $screenName))) { /* screen name is already in use */ };