concrete/src/User/User.php
public function inGroup($g)
    {
        $app = Application::getFacadeApplication();
        $db = $app['database']->connection();

        $v = array($this->uID);
        $cnt = $db->GetOne("select Groups.gID from UserGroups inner join " . $db->getDatabasePlatform()->quoteSingleIdentifier('Groups') . " on UserGroups.gID = Groups.gID where uID = ? and gPath like " . $db->quote($g->getGroupPath() . '%'), $v);

        return $cnt > 0;
    }
public function inGroup($g)
    {
        $app = Application::getFacadeApplication();
        $db = $app['database']->connection();

        $v = array($this->uID);
        $cnt = $db->GetOne("select Groups.gID from UserGroups inner join " . $db->getDatabasePlatform()->quoteSingleIdentifier('Groups') . " on UserGroups.gID = Groups.gID where uID = ? and gPath like " . $db->quote($g->getGroupPath() . '%'), $v);

        return $cnt > 0;
    }
public function inGroup ( $ g ) { $ app = Application :: getFacadeApplication ( ) ; $ db = $ app [ 'database' ] -> connection ( ) ; $ v = array ( $ this -> uID ) ; $ cnt = $ db -> GetOne ( "select Groups.gID from UserGroups inner join " . $ db -> getDatabasePlatform ( ) -> quoteSingleIdentifier ( 'Groups' ) . " on UserGroups.gID = Groups.gID where uID = ? and gPath like " . $ db -> quote ( $ g -> getGroupPath ( ) . '%' ) , $ v ) ; return $ cnt > 0 ; }
Return true if user is in Group.

@param Group $g
@return bool
Return true if user is in Group .