$map['type']=1;
$where['type']=2;
$where['to']=$user_id;
$where['_logic'] = 'AND';
$map['_logic']='OR';
$map['_complex']=$where;
$where['type']=2;
$where['to']=$user_id;
$where['_logic'] = 'AND';
$map['_logic']='OR';
$map['_complex']=$where;