title: Cloud Functions for Firebase - Get current user id
body: <p>Spent a while searching out a solution to what seems a simple problem but... How can I get the current users details inside a cloud function (when not using an functions.auth trigger)?   I'm sure there must be a simple solution to this. (I hope)</p>
  
  <p>Thanks for the replies... Just done that but how would I get the /user/uid from the Firebase DB within a storage triggered event? e.g. </p>
  
  <pre><code>exports.addUploadInfoToDatabase = functions.storage.object().onChange(event =&gt; {
    console.log("firebase storage has been changed");
    // need to find the uid in here somehow
    admin.database().ref(`/user/uid`).push({testKey:"testData"});
  })
  </code></pre>
  
  <p>Applogies if I've missed the point in your replies.</p>
  
  <p>Thanks...</p>