How to get current model name in AppModel
?
I have this code for password confirmation and password confirmation. But I would like to put it in AppModelp
:
function isSameAs($check, $field) { if( $check === $this->data['User'][$field] ) { return true; } else { return false; } }
I am using CakePHP 2.
source share