def get_user(self):

        token = self.accessToken()
        if not token:
            return None

        session = current.session
        user = None
        try:
            user = self.call_api(token)
        except Exception, e:
            session.token = None

        user_dict = None
        if user:
            # Check if a user with this email has already registered
            #session.googlelogin = True

            auth = current.auth
            table = auth.settings.table_user
            query = (table.email == user["email"])
            existent = current.db(query).select(table.id,
                                                table.password,
                                                limitby=(0, 1)).first()
            if existent:
                #session["%s_setpassword" % existent.id] = existent.password

                user_dict = {#"first_name": user.get("given_name", user["name"]),
                             #"last_name": user.get("family_name", user["name"]),
                             "googleid": user["id"],
                             "email": user["email"],
                             "password": existent.password
                             }
            else:
                # b = user["birthday"]
                # birthday = "%s-%s-%s" % (b[-4:], b[0:2], b[-7:-5])
                # if "location" in user:
                #     session.flocation = user["location"]
                #session["is_new_from"] = "google"

                auth.s3_send_welcome_email(user)

                names = user.get("name", "").split()
                first = names[0] if len(names) > 0 else ""
                last = names[-1] if len(names) > 1 else ""

                user_dict = {"first_name": user.get("given_name", first),
                             "last_name": user.get("family_name", last),
                             "googleid": user["id"],
                             "nickname": "%(first_name)s-%(last_name)s-%(id)s" % \
                                                {"first_name": first.lower(),
                                                 "last_name": last.lower(),
                                                 "id": user["id"][:5],
                                                 },
                             "email": user["email"],
                             #"birthdate": birthday,
                             "website": user.get("link", ""),
                             #"gender": user.get("gender", "Not specified").title(),
                             "photo_source": 6 if user.get("picture", None) else 2,
                             "googlepicture": user.get("picture", ""),
                             "registration_type": 3,
                             }

        return user_dict

    # -------------------------------------------------------------------------
Returns the user using the Graph API.
dataset/ETHPy150Open sahana/eden/modules/s3oauth.py/GooglePlusAccount.get_user