It's generally not good practice to use sfContext::getInstance(). Read this post http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/.
How about adding a static method to your sfGuardUserTable.class.php
, e.g
// \lib\form\sfGuardUserTable.class.php
static public function getUsersByIdEmpresa($idempresa)
{
//...
$q->andWhere('idempressa = ?', $idempresa);
return $q->execute();
}
Then calling it in your controller or from where you need, e.g
// \app\myApp\modules\myModule\actions\action.class.php
public function executeMyAction() {
$profile = $this->getUser()->getProfile();
$usersRelatedByIdempresa = sfGuardUserTable::getUsersByIdempresa($profile->getIdempresa());
//...
}