Your 'ID_number' in the modifier in the newAdoption function doesn't exists.
You shouldn't rely on an user input since any user can pass any value and it's therefore not trust worthy.
I don't know what you are trying to do, but you should try a pattern like this:
struct MyUser {
bool exists;
address userAddress;
}
mapping (address => MyUser) public myUsers;
modifier isRegistered(address userAddress){
require (myUsers[userAddress].exists, "Object DNE");
_;
}
function newAdoption(address addy1, address addy2) public isRegistered(msg.sender){
}
That way, your smart contract checks if the address contacting it is a user.
Edit: To make it more simple, you could also do that:
mapping (address => bool) public myUsers;
modifier isRegistered(address userAddress){
require (myUsers[userAddress], "Object DNE");
_;
}
function addUser(address _newUser) external onlyOwner() {
myUsers[_newUser] = true;
}
function newAdoption(address addy1, address addy2) public isRegistered(msg.sender){
}