Brimbox Logo Brimbox Version 2.3.4 Released


Method to check password, usually used to double check a permission and password.

Class: bb_main, called as $main

File: bb_main (php)


function validate_password($con, $passwd, $userroles)


$valid = $main->validate_password($con, $passwd, $userroles);

Returns: true if user has permission and a valid password, false if not.

Parameter: $con (database connector)
Valid database connection.

Parameter: $passwd (string)
Password passed in through a form $_POST or $POST, recommended to be secure.

Parameter: $userroles (string or array of string)
Permission level or levels a user must have, single userrole string or array consisting of allowed userroles.

Updated: 2016-07-17