Skip to content

Commit

Permalink
added error message for failed login cookie that is character(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nissen committed Apr 13, 2017
1 parent 2ca554a commit fe5ae09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/login.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ login <- function(email, password, rememberMe=FALSE){
if(is.null(cookie)){
all_cookies <- a$cookies
cookie <- all_cookies[grep("^u$", all_cookies$name, ignore.case=F),"value"]
if(is.null(cookie)){
if(is.null(cookie) | identical(cookie, character(0))){
stop("login failed")
}
}

return(cookie)
}

0 comments on commit fe5ae09

Please sign in to comment.