Get the profile (i.e., username, password, etc.) of a user.

        Parameters
        ----------
        auth_secret: str
            The authentication secret of the logged-in user.

        Returns
        -------
        bool
            True if the logout is successful, False otherwise.
        result
            A dict containing the following keys:

            -  USERNAME_KEY
            -  PASSWORD_HASH_KEY
            -  AUTH_KEY

            if the user profile is obtained successfully; otherwise a dict
            containing the error string with the key ERROR_KEY.

        Note
        ----
        Possible error strings are listed as below:

        -  ERROR_NOT_LOGGED_IN

def get_user_profile(self, auth_secret):
        """Get the profile (i.e., username, password, etc.) of a user.

        Parameters
        ----------
        auth_secret: str
            The authentication secret of the logged-in user.

        Returns
        -------
        bool
            True if the logout is successful, False otherwise.
        result
            A dict containing the following keys:

            -  USERNAME_KEY
            -  PASSWORD_HASH_KEY
            -  AUTH_KEY

            if the user profile is obtained successfully; otherwise a dict
            containing the error string with the key ERROR_KEY.

        Note
        ----
        Possible error strings are listed as below:

        -  ERROR_NOT_LOGGED_IN
        """
        result = {pytwis_constants.ERROR_KEY: None}

        # Check if the user is logged in.
        loggedin, userid = self._is_loggedin(auth_secret)
        if not loggedin:
            result[pytwis_constants.ERROR_KEY] = \
                pytwis_constants.ERROR_NOT_LOGGED_IN
            return (False, result)

        userid_profile_key = pytwis_constants.USER_PROFILE_KEY_FORMAT.format(userid)
        result = self._rc.hgetall(userid_profile_key)

        return (True, result)