My app creates and stores in the database hashed passwords via:
Editor::inst( $db, 'contacts' )
->fields(
Field::inst( 'credential' )->validator( 'Validate::notEmpty' )
->setFormatter( function ( $val, $data, $opts ) { return password_hash( $val , PASSWORD_DEFAULT);} )
->getFormatter( function ( $val, $data, $opts ) { return null;})
)
->process( $_POST )
->json();
This works like a charm for passwords using letters (123) and numbers (123). But apparently if the password contains any characters (@#$%), the password_verify() function returns a FALSE.
Any suggestions as to why this might be?