Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Fill userlist from mysql Database #24

Description

@ehrenberg

Hi everyone,

I've tried to fill my Userlist with Ajax in my own Adapter. But no users shown. The Array is filled. I'am confused. Maybe some help?
Thanks alot!

this.users = new Array();
        $users = this.users;
        $.ajax({
            url : "/plugins/messages/ajax.php",
            type : "POST",
            dataType: 'json',
            data : {
                type : "get_userlist"
            },
            success : function(data, textStatus, jqXHR) {
                $.each(data, function(index) {
                    var tmpUser                 = new ChatUserInfo();
                    tmpUser.Id                  = data[index].ID;
                    tmpUser.RoomId              = 1;
                    tmpUser.Name                = data[index].FirstName+' '+data[index].LastName;
                    tmpUser.Email               = data[index].Email;
                    tmpUser.ProfilePictureUrl   = "";
                    tmpUser.Status              = data[index].Online;
                    $users.push(tmpUser);
                });
            }
        });

        this.users = $users;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions