Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Agendador
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Agendador
Agendador
Commits
28f05b2c
Commit
28f05b2c
authored
Nov 28, 2016
by
Matheus Horstmann
🐴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error when user puts wrong password
Signed-off-by:
Matheus Horstmann
<
mch15@inf.ufpr.br
>
parent
e51a6a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
app/controllers/sessions_controller.rb
app/controllers/sessions_controller.rb
+7
-4
No files found.
app/controllers/sessions_controller.rb
View file @
28f05b2c
...
...
@@ -21,20 +21,23 @@ class SessionsController < Devise::SessionsController
# yield resource if block_given?
# respond_with resource, location: after_sign_in_path_for(resource)
# Get status of current city
current_city
=
CityHall
.
find_by
(
city_id:
current_citizen
.
city_id
)
# Get resource
self
.
resource
=
warden
.
authenticate!
(
auth_options
)
# Check if resource is not null and if a citizen has been signed_in
if
!
resource
.
nil?
&&
citizen_signed_in?
# Get status of current city
current_city
=
CityHall
.
find_by
(
city_id:
current_citizen
.
city_id
)
# if !resource.active
# sign_out(resource)
# flash[:alert] = "Sua conta está inativa, por favor contate o administrador!"
# return redirect_to root_path
# end
# Set expiretion time to send message when expiring session
session
[
:expires_at
]
=
Time
.
current
+
24
.
hours
# Set variable to show loading bar
...
...
@@ -81,7 +84,7 @@ class SessionsController < Devise::SessionsController
# set_flash_message(:notice, :signed_in) if is_navigational_format?
# sign_in(resource_name, resource)
# respond_with resource, :location => root_path
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment