Posted by Tom
2014-06-03

This is a reply to charles

To allow users to view his/her own records only, insert these lines to web/staff/app/cls_ps_addresses.inc.php

$user_id = $user_id = $this->sys->AuthSession->GetV( $this->sys->Get( XA_FRAME_FIELDSET_ID ) );
$qc["rlog_create_user_id"] = "`rlog_create_user_id`='{$user_id}'";

The location is in the case "search:" block. It should be below the following line:

$qc = $def->GetQueryCond();

The result should look like:

			//-- [BEGIN] Criteria validated successfully 
if ( $b )
{
//-- [BEGIN] OK to show results
$this->SetDisplay( "def:", true );
//-- [END] OK to show results

//-- [BEGIN] Create query
$qc = $def->GetQueryCond();
//-- [END] Create query

$user_id = $user_id = $this->sys->AuthSession->GetV( $this->sys->Get( XA_FRAME_FIELDSET_ID ) );
$qc["rlog_create_user_id"] = "`rlog_create_user_id`='{$user_id}'";

//-- [BEGIN] Output query results in table memberat
$def->SetNS( "rs:def:" );
$def->SetList( "(sr)" );
$b_clear = isset( $this->b_search_clear_page_idx );
$def->ToZBufferTable( "_this/search_ps", $qc, $b_clear, 'AND' );
//-- [END] Output query results in table format
}
//-- [END] Criteria validated successfully