Shiny happy people coding

Coding with smile

Activate User in Redmine by Rails Console

| Comments

If during a moment, you send mail are block and you have redmine. All new users can't receive their activation. Redmine can't activate by admin interface. You need use Rails console to activate this users.

In this example, we activate the user with login 'ook'

First, connect in rails console in production mode.

$ ./script/console production

When you are in console, search the user, change his state and delete the activation token.

rails@shinydedi /var/rails/redmine/current $ ./script/console production Loading production environment (Rails 2.0.2) >> u = User.find_by_login 'ook' => # >> u.status = User::STATUS_ACTIVE => 1 >> u.save => true >> t = Token.find_by_action_and_user_id('register', u.id) => # >> t.destroy => #

It's works. Now your user ook can be logged in redmine without his activation mail.

Traduction Francaise