Added send_code, get_chain_from_user functions. The get_chain_from_user generates a chain from a given user and returns an array in reverse sequential order.