Skip to content

Instantly share code, notes, and snippets.

@mauriciodarocha
Last active December 12, 2015 01:08
Show Gist options
  • Save mauriciodarocha/4688721 to your computer and use it in GitHub Desktop.
Save mauriciodarocha/4688721 to your computer and use it in GitHub Desktop.
Função para verificar se usuário está "logado" em loja Vtex
/*
*
* Função para verificar se existe usuário logado em loja Vtex
*
* Uso:
* if(is_logged()) {
* // código se está logado
* } else {
* // código se NÃO está logado
* }
*
*/
var is_logged = function(){
return /ISI.+Apelido/.test(document.cookie);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment