Check login

From PokeTALK developers

Jump to: navigation, search

Contents

Description

This method allows you to determine if a user is logged in or not.

Usage

    ptBase.check_login(callback);

or

    var result = ptBase.check_login();

Parameters

Required Name Type Description
optional callback function optional callback function to call after execution

Response

Parameter Type Description
result boolean returns true if the user is logged in, false otherwise.

object

 
   {"result":true}

Example

 
   ptBase.check_login(function(data){
      if (!data.result) {	
         alert ('not logged in');
      } else {
         alert ('logged in');
      }
   });
Personal tools