Stephane Posted November 27, 2015 Share Posted November 27, 2015 Hi, I use a database in the PAGES system. I would like to use the "user" field to give data access. If I use only one user, all it's ok {{if member.member_id == $record->field_20}} For now, I put 2 user in my user field and this code does work. My field # 20 gives me this result for my 2 users: 206,1 (for the user 206 and user 1) I want to make a condition based on user entered into the fields. I'm test this, but it does not. {{if member.member_id == in_array( member.member_id, array($record->field_20) )}} Thank's for your support... Stef Link to comment Share on other sites More sharing options...
Marcher Technologies Posted November 27, 2015 Share Posted November 27, 2015 {{if in_array( member.member_id, explode(',', $record->field_20) )}} Link to comment Share on other sites More sharing options...
Stephane Posted November 27, 2015 Author Share Posted November 27, 2015 Thank's for your help Marcher... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.