# Sign in Action Button

**URL:** <https://community.glideapps.com/t/sign-in-action-button/20164>\
**Category:** Report a Bug\
**Created:** [December 22, 2020, 3:27am UTC](https://community.glideapps.com/t/sign-in-action-button/20164 "2020-12-22T03:27:00Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 23, 2020, 5:13pm UTC](https://community.glideapps.com/t/sign-in-action-button/20164/29 "2020-12-23T17:13:18Z")

</div>

@Jen_NYCP - just for a bit of fun, I coded up something that would automatically change the image back. I’ve tested it, and it works fine, albeit with a short delay.

```
function enforce_profile_image(event) {
  var profile_sheet_name = 'Users'; // Replace with the name of your user profiles sheet
  var image_col = 4; // Replace this with the column number that contains the image (A=1, B=2, C=3, etc)
  var image_url = 'https://randomuser.me/api/portraits/women/74.jpg'; // Replace this with the URL of your logo
  
  var sheetname = event.source.getActiveSheet().getName();
  if (sheetname != profile_sheet_name) {
    return;
  }
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName(sheetname);
  var data = sheet.getRange(2,image_col, sheet.getLastRow()-1, 1).getValues();
  data.forEach(function (row) {
    row[0] = image_url;
  });
  sheet.getRange(2,image_col, sheet.getLastRow()-1, 1).setValues(data);
} 

```

You would use that with an `On Change` trigger. If you’re not sure how to configure triggers, I covered this in a recent [tutorial](https://community.glideapps.com/t/using-app-script-with-a-json-api/20051) (Part 4). If you wanted to use it, note that you’d need to replace the variable values on the first 3 lines.

---

_[View the full topic](https://community.glideapps.com/t/sign-in-action-button/20164)._
