How to return a false to datahandler:user on a custom plugin
#1
Smile 
How to return a false to datahandler:user on a custom plugin

Basically I made a custom hook to ''datahandler_user_validate" that checks if a custom registration field data (exists or been used), namely "Student ID" which is an optional field (can be left blank). But if the guest inputs something and filters falls into false, the plugin should stop "datahandler_user_insert" from querying the INSERT_USER and instead return an error / return false.

any help is appreciated...

Oh. what a bummer, I actually solved my problem by using arguments

$args = $plugins->add_hook("datahandler_user_validate", "db_override");
function db_override($args)
{
$args->set_error($reply);
return false;
}

Fixes my day....


Attached Files Thumbnail(s)
   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)