My b2evolution Version: 2.x
Hi,
I want to trigger something when user's password is wrongly entered.
Under event handler LoginAttempt (plugin) there is a param which is:
'pass_ok': is the password ok for 'login'? (by reference) (since 1.10.0)
but I cant seem to test for it.
I tried combinations of:
if ( $params['pass_ok'] == 1 )
if ( $params['pass_ok'] == true )
if ( $params['pass_ok'] == 0 )
they all cant distinguish between whether the user's password was correct or not.
But it seems to work with:
if ( user_pass_ok( $params['login'], $params['pass_md5'], true ) == 0 )
I dont want to call user_pass_ok function if it is already in the data structure pass_ok.
Have I mistaken the use of this pass_ok?
Thanks.
Actually - that line
if ( user_pass_ok( $params['login'], $params['pass_md5'], true ) == 0 ) { do this } else { do that }
didnt work also
Nor did this:
if ( user_pass_ok( $params['login'], $params['pass_md5'], true ) ) { do this } else { do that }
Now I am really confused