Current Record: setSecurityFilters #91

Example In the delegate class for the users table: <?php class tables_users { function init(&$table){ if ( !isAdmin() ...

Current Record: setSecurityFilters #91

Example In the delegate class for the users table: <?php class tables_users { function init(&$table){ if ( !isAdmin() ...

setSecurityFilter() method

[Permalink]

Example

In the delegate class for the users table:

<?php
class tables_users {
    function init(&$table){
        if ( !isAdmin() ){
            $table->setSecurityFilter(array('group_id'=>10));
        }
    }
}

This will only set the filter on non-admin users (assuming that you have defined a function isAdmin() to tell you if the current user is an admin user.

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved