// looks through the LLL to see if the email and password passed into the method exist in the list public bool check_info(string email, string password) { if (!search_list(email)) // checks to see if the email exists in the LLL { return(false); } account_info temp = found_account.get_current_account(); return(temp.check_password(password)); // checks to see if the password matches the account }
// searches the LLL of accounts to see if the name_attempt already exists public bool search_list(string name_attempt) { if (node_count < 1) // no nodes in the list { return(false); } account_info temp; account_node temp_node = next; for (int i = 0; i < node_count; ++i) // loop to check each node in the list { temp = temp_node.get_current_account(); if (temp.check_email(name_attempt)) { found_account = temp_node; return(true); } temp_node = temp_node.go_next(); } return(false); }