Commit
aa5ad7812a3281279bfcda1dbcb481eb87c7919c
Exists in
master
and in
41 other branches
add_sisp_to_chef, add_super_archives_plugin, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, lxc_settings, margin_fix, mezuro_cookbook, refactor_download_block, remove_broken_theme, remove_sisp_buttons, sisp_catalog_header, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_to_rails4, stable-4.1, stable-4.2, theme_header, theme_javascript_refactory, update_search_by_categories
Removes unecessary expired private token.
| @@ -5,13 +5,8 @@ email = ARGV[1] |
| @@ -5,13 +5,8 @@ email = ARGV[1] |
5
| password = SecureRandom.random_number.to_s |
5
| password = SecureRandom.random_number.to_s |
6
| |
6
| |
7
| user = User.find_by_login(login) |
7
| user = User.find_by_login(login) |
8
| -if user |
| |
9
| - if user.private_token_expired? |
| |
10
| - user.generate_private_token! |
| |
11
| - else |
| |
12
| - exit(0) |
| |
13
| - end |
| |
14
| -else |
8
| + |
| |
9
| +unless user |
15
| user = User.create!( |
10
| user = User.create!( |
16
| login: login, |
11
| login: login, |
17
| email: email, |
12
| email: email, |