array( 'users' => array( 'fields' => array( 'where_clause' => array( // For Users class // this will be the display label on the form 'label' => 'Limit via SQL where clause', // the input type to use for data entry 'html type' => 'textarea', // you can only edit this if an admin and changing someone // else' record 'restrict' => true, // will be displayed on a hover in HTML5 (ie, title=) 'instructions' => 'This will be added to every SQL query to limit access, or 1=1 for everything', // this is entered in an empty box, ie placeholder= 'hint' => 'Enter an SQL where clause', // for Data Source 'dbColumn' => 'where_clause', // actual mySQL column type 'type' => 'text', // set it to not null if we build the table ourselves 'required' => false, // set a default value 'default' => '1=1' ) ) ) ) ); $connection = new usersPermissionsDataSourceMySQLi( array( 'username' => 'test', 'password' => 'test', 'database' => 'test' ), $customFields ); $initValues = array( 'users' => array( 'login' => 'admin', 'pass' => password_hash( 'admin', PASSWORD_DEFAULT ), 'admin' => 1, ) ); $connection->buildTable( ); $connection->initTables( $initValues ); $connection->addPermission ( 'Main', 'P1', 'Permission All', 1 ); $connection->addPermission ( 'Main', 'P2', 'Permission Some', 0 ); $connection->setUsersPermissions(); ?> Build Table

test() ) { print "Table (re)built"; } else { print "Something went wrong, check apache2 logs"; } ?>