Updating the AppModel and User Model to be compatible with PHP 5.4x