Send message to server

How can I get the network player of the server, when the client is disconnecting?
Would I need to send a RPC, with the server’s network player through OnPlayerDisconnected to the client, then execute some code Which will send a RPC to the server with the given data?

Found the answer for this one, here is the method:

function Start() {
   networkView.RPC("SendToServer", RPCMode.Server, PlayerPrefs.GetString("UserID"));

function SendToServer(UserID : int) {
   //Runs on the server machine only.
   Debug.Log("Saved "+UserID+"'s data.");