Skip to content

Commit

Permalink
Prevent blocked person to login
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhq committed Mar 23, 2015
1 parent 4324ab2 commit 672eb0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/visitors_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class VisitorsController < ApplicationController
def index
if current_user.users_roles.active.present?
if current_user.users_roles.active.present? and current_user.person.status
current_user.update_attribute(:active_role, current_user.users_roles.active.first.role.name) if current_user.users_roles.active.present? and current_user.users_roles.active.length==1
if current_user.active_role.present?
role_id = Role.where(:name=>current_user.active_role).try(:first).id
Expand Down

0 comments on commit 672eb0a

Please sign in to comment.