check mobile user
This commit is contained in:
@@ -38,15 +38,14 @@ class BaseOrigamiController < ActionController::Base
|
||||
#check webview
|
||||
def check_mobile
|
||||
status = false
|
||||
token_status = false
|
||||
authenticate_with_http_token do |token, options|
|
||||
if token
|
||||
token_status = true
|
||||
session[:webview] = true
|
||||
end
|
||||
session[:session_token] = token
|
||||
end
|
||||
|
||||
if token_status && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i
|
||||
if session[:webview] && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i
|
||||
status = true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user