# ChangeName Error for admin with SSO

**URL:** https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990
**Category:** Bug
**Created:** [April 27, 2015, 10:43am UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990 "2015-04-27T10:43:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ColdSun](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/coldsun/32/66668_2.png) [@ColdSun](https://meta.discourse.org/u/ColdSun)
#### Post date: [April 27, 2015, 10:43am UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/1 "2015-04-27T10:43:00Z")

</div>

When attempting to edit the original admin account’s username (SSO is enabled but not used for this user), the following error was created

```
Uncaught TypeError: this.get(...).changeUsername is not a function
Url: /discourse/views/preferences-username
Line: 18
Column: 43
Window Location: http://forums.ego.ninja/users/coldsun/preferences/username

```

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [April 27, 2015, 8:06pm UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/2 "2015-04-27T20:06:18Z")

</div>

Is the user deleted or anything unusual like that? I just tried to change my name locally and it worked fine.

---

<div class="post-metadata">

### Author: ![ColdSun](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/coldsun/32/66668_2.png) [@ColdSun](https://meta.discourse.org/u/ColdSun)
#### Post date: [April 28, 2015, 12:42am UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/3 "2015-04-28T00:42:39Z")

</div>

Nope. The user hasn’t been deleted or modified in any way.

---

<div class="post-metadata">

### Author: ![ColdSun](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/coldsun/32/66668_2.png) [@ColdSun](https://meta.discourse.org/u/ColdSun)
#### Post date: [April 28, 2015, 5:51am UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/4 "2015-04-28T05:51:08Z")

</div>

Here’s the env log:

```
TypeError: this.get(...).changeUsername is not a function
at __exports__.default.Ember.View.extend.keyDown (/discourse/views/preferences-username:18:43)
at EmberObject.extend.trigger (/production/ember:39524:25)
at apply (/production/ember:19209:27)
at superWrapper [as trigger] (/production/ember:18780:15)
at Object.merge.handleEvent (/production/ember:39739:23)
at CoreView.extend.handleEvent (/production/ember:41827:34)
at Object.Backburner.run (/production/ember:195:27)
at Object.Backburner.join (/production/ember:218:27)
at Function.run.join (/production/ember:17510:30)
at __exports__.default.EmberObject.extend._bubbleEvent (/production/ember:37392:20)

```

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [April 28, 2015, 3:37pm UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/5 "2015-04-28T15:37:23Z")

</div>

Are you hitting enter rather than clicking the button? It might be that simple!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [April 28, 2015, 3:39pm UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/6 "2015-04-28T15:39:52Z")

</div>

Confirmed and fixed. The bug was the enter key to submit the form was broken:

[https://github.com/discourse/discourse/commit/1e364000210410beeb9a6f3c78ea70969cae2e99](https://github.com/discourse/discourse/commit/1e364000210410beeb9a6f3c78ea70969cae2e99)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 28, 2015, 3:54pm UTC](https://meta.discourse.org/t/changename-error-for-admin-with-sso/27990/7 "2015-04-28T15:54:01Z")

</div>


