function validate_password($password)

prettem

Member
Hello dear Forum,

it concerns the pw validation, if I made a function validate_password($password) {} it throws an

[error] 1830608#0: *35263 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, function "dadabik_validate_password" not found or invalid function name in /var/www/vhosts/mpi-technik.at/ems.mpi-technik.at/include/business_logic.php:0

I renamed it both to function dadabik_validate_password($password) {} and pwd.php:115 to

.........if($enable_password_validation === 1 && dadabik_validate_password($clear) === false){.........

it works fine.

The help-text in config.php:259 "... the password is validated using a validate_password($password) function that you have to write in custom_functions.php;..."

additional: a strange behavior is that sometimes a parameter $password (coming from pwd.php) delivers a string, sometimes an array, but this helps
(in dadabik_validate_password($password))
):

if (is_array($password)) {
$password = $password['password_user'];
}

best regards
Manuel

Your current DaDaBIK version​

You are using DaDaBIK version 11.10-Elba enterprise, installed on 02.09.2023 (installation code: 1907564f2723317ba7), the latest version of DaDaBIK is 11.10-Elba released on 13.07.2023

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 8.1.23

mysql version: 10.6.12-MariaDB-0ubuntu0.22.04.1

Web server: nginx/1.24.0

Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0
 

eugenio

Administrator
Staff member
Hello,
the function is validate_password, not dadabik_validate_password.
The error you got is very strange, unless you put by mistake your validation function in form configurator. Maybe you set it as custom validation function in form configurator?

Best,
 
Top