55 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
56 $this->SiteAccess =
get_package(
'site::site_access' ,
'last' , __FILE__ );
90 $id = $this->Security->get( $id ,
'integer' );
92 $Sites = $this->SiteAccess->unsafe_select( $this->SiteAccess->NativeTable.
".id = $id" );
94 if( count( $Sites ) === 0 || count( $Sites ) > 1 )
96 throw(
new Exception(
'Site with id '.$id.
' was not found' ) );
100 return( $Sites[ 0 ] );
103 catch( Exception $e )