# Checking "must approve users" and approving manually requires activation

**URL:** https://meta.discourse.org/t/checking-must-approve-users-and-approving-manually-requires-activation/60368
**Category:** Bug
**Created:** [April 3, 2017, 12:03pm UTC](https://meta.discourse.org/t/checking-must-approve-users-and-approving-manually-requires-activation/60368 "2017-04-03T12:03:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nordize](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nordize](https://meta.discourse.org/u/nordize)
#### Post date: [April 3, 2017, 12:03pm UTC](https://meta.discourse.org/t/checking-must-approve-users-and-approving-manually-requires-activation/60368/1 "2017-04-03T12:03:06Z")

</div>

This was unexpected. Previously I had activated accounts with only the options `invite only` and `login required` checked. Everyone was able to login just fine.

Then I checked the setting `must approve users` and went to all users, and clicked on the “Approve” button and it then said “Approved: Yes”. My admin account was already approved by system. All account were already reported as activated. I also checked with rails:

```rails
 active: true,
 approved_by_id: -1,
 approved_at: Thu, 23 Mar 2017 16:44:25 UTC +00:00,
 previous_visit_at: Sun, 02 Apr 2017 13:35:25 UTC +00:00,

```

Which looks fine and should allow login. However, trying to login from any account, **including my main admin account** resulted in this:

```plaintext
You can't log in yet. We previously sent an activation email to you at admin@example.com. Please follow the instructions in that email to activate your account. Click here to send the activation email again.

```

First, that’s false, there was no activation email sent. Second, this shouldn’t have happened since all accounts were already approved and activated.

I then also tried in rails:

```rails
u=User.find_by_username('myaccount');
u.approve(-1,false);
u.save!

```

The error was still there. I also tried in rails to deactivate,reactivate:

```rails
u.active=false
u.save!
u.activate();
u.save!

```

Still nothing …

What’s worse is that if I go back and disable the `must approve users` option, then **the error is still there**! … All my users now have to go via the email activation again. Is there another way to manually bring all account back to allow login directly like before?

This sounds like a bug …

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 3, 2017, 3:56pm UTC](https://meta.discourse.org/t/checking-must-approve-users-and-approving-manually-requires-activation/60368/2 "2017-04-03T15:56:08Z")

</div>

Email must be validated by the user otherwise it is a giant gaping security hole.

---

<div class="post-metadata">

### Author: ![nordize](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nordize](https://meta.discourse.org/u/nordize)
#### Post date: [April 3, 2017, 4:17pm UTC](https://meta.discourse.org/t/checking-must-approve-users-and-approving-manually-requires-activation/60368/3 "2017-04-03T16:17:26Z")

</div>

Maybe I misexplained, but I’m talking about already existing and activated accounts, including the main site admin account … the behaviour I described just can’t be an expected one

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 13, 2017, 5:41pm UTC](https://meta.discourse.org/t/checking-must-approve-users-and-approving-manually-requires-activation/60368/4 "2017-09-13T17:41:28Z")

</div>

Is this still an issue? I know we fixed a number of bugs here since this was reported. Let us know.
