Pb using AccountsService in an extension



Hello,

I don't understand a problem I have using AccountsService in an extension, though it works in looking glass. 
The code is really simple.

In Looking glass :

AS = imports.gi.AccountsService
AS.UserManager.get_default().list_users().length

This code returns 3 (I have 3 user accounts on that computer, so it's ok).

In my extension :

const AS = imports.gi.AccountsService;

function init() {}

function enable() {
 global.log(AS.UserManager.get_default().list_users().length)
}

function disable() {}

This code returns 0!

Does anyone has a clue on that?

Thanks in advance.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]