Creating users by hand

You must use the Noosfero Console to follow this steps.

Sometimes may be usefull to create users by console, maybe you remove link to new registration from Noosfero interface...

>> usr = User.create!(:login => 'john', :email => '', :password => '12345', :password_confirmation => '12345')
=> #<User id: 60, login: "console", email: "", crypted_password: "93bbf8972fb6abed5cde7e2b350059cb60d6fdae", salt: "830f9a4815dd786217da5454c50207359b86fa66", created_at: "2011-01-13 08:18:09", updated_at: "2011-01-13 08:18:09", remember_token: nil, remember_token_expires_at: nil, terms_of_use: nil, terms_accepted: nil, environment_id: 1, password_type: "salted_sha1", enable_email: false, last_chat_status: "", chat_status: "", chat_status_at: nil>

If your environment was configured to send a validation e-mail do enable the user, you must also do this:
>> usr.activate!

Then go to Noosfero and login as 'john' and password '12345'.

Add comment
You need to login to be able to comment.

This topic: Development > WebHome > Console > CreatingUsersByHand
Topic revision: 11 Apr 2018, AurelioAHeckert
Translations: English
Search on Docs:
ActionItem Search:

Copyright © 2007-2018 by the Noosfero contributors
Colivre - Cooperativa de Tecnologias Livres