OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
allow omni-auth user to switch to password on reinvitation
Markus Kahl56ee0cef92a9
diff --git a/app/controllers/concerns/user_invitation.rb b/app/controllers/concerns/user_invitation.rbindex d948631d430..068fbcb62c4 100644--- a/app/controllers/concerns/user_invitation.rb+++ b/app/controllers/concerns/user_invitation.rb@@ -88,10 +88,13 @@ module UserInvitation# @param user_id [Integer] ID of the user to be re-invited.# @return [Token] The new token used for the invitation.def reinvite_user(user_id)- clear_tokens user_id+ User.transaction do+ clear_tokens user_id+ reset_login user_id- Token::Invitation.create!(user_id: user_id).tap do |token|- OpenProject::Notifications.send Events.user_reinvited, token+ Token::Invitation.create!(user_id: user_id).tap do |token|+ OpenProject::Notifications.send Events.user_reinvited, token+ endendend@@ -99,6 +102,11 @@ module UserInvitationToken::Invitation.where(user_id: user_id).delete_allend+ def reset_login(user_id)+ User.where(id: user_id).update_all identity_url: nil+ UserPassword.where(user_id: user_id).destroy_all+ end+### Creates a placeholder name for the user based on their email address.# For the unlikely case that the local or domain part of the email address