Put in Diego's change so blog posts appear.
[elgg.git] / units / users / function_access_level_sql_where.php
blob719d3052fc5102419ac1397426acd64fe9b5b8d6
1 <?php
3 // Returns an SQL "where" clause containing all the access codes that the user can see
5 $run_result = " access = 'PUBLIC' ";
7 if (logged_on) {
9 $run_result = " owner = " . $_SESSION['userid'] . " ";
10 $run_result .= " OR access IN ('PUBLIC', 'LOGGED_IN', 'user" . $_SESSION['userid'] . "') ";
12 } else {
14 $run_result = " access = 'PUBLIC' ";