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 ) ) ) ) ); /* we haven't made the connection already, so instead we pass the * parameters needed in the third parameter here and let the * usersDataSource class make its own connection * * we also want to pass the customFields in so it will do the merge * immediately. */ $connection = new usersPermissionsDataSourceMySQLi( array( 'username' => 'test', 'password' => 'test', 'database' => 'test' ), $customFields ); // Pass the same custom fields to the Users class if ( ! isset( $_SESSION['user'] ) ) { $_SESSION['user'] = new UsersPermissions( $customFields ); } // check if the user has request a log out. if ( isset( $_REQUEST['logout'] ) ) $_SESSION['user']->logout(); $url = htmlentities($_SERVER["PHP_SELF"]); ?> Login
data() ); ?>
HTML($connection); ?>
admin($connection); print $_SESSION['user']->errors(); $_SESSION['user']->clearErrors(); } ?>