C# Class Piwik.Analytics.Modules.UsersManager

Service Gateway for Piwik UsersManager Module API For more information, see http://developer.piwik.org/api-reference/reporting-api#SitesManager
This Analytics API is tested against Piwik 2.16.5
Inheritance: PiwikAnalytics
Show file Open project: piwik/piwik-dotnet-api Class Usage Examples

Public Methods

Method Description
addUser ( string userLogin, string password, string email, string alias = null ) : Hashtable

Add a piwik user

deleteUser ( string userLogin ) : Hashtable

Delete a piwik user

getSitesAccessFromUser ( string userLogin ) : ArrayList

Get all sites and the specific access level (view or admin) where the given user has access to

getTokenAuth ( string userLogin, string md5Password ) : string

Calculates the token auth by using a user login and a md5 hashed password

getUser ( string userLogin ) : ArrayList

Get a piwik user by login

getUserByEmail ( string userEmail ) : ArrayList

Get a piwik user by email

getUserLoginFromUserEmail ( string userEmail ) : string

Get the login for a piwik user with a given email

getUserPreference ( string userLogin, string preferenceName ) : object

Get a piwik user preference

getUsers ( string userLogins = null ) : ArrayList

Get all piwik users with the given list of logins

getUsersAccessFromSite ( int idSite ) : ArrayList

Get all piwik users and their access level for the piwik site with the given id

getUsersHavingSuperUserAccess ( ) : ArrayList

Get all piwik users which have super user access

getUsersLogin ( ) : ArrayList

Get user logins of all registered piwik users

getUsersSitesFromAccess ( UserAccess access ) : Hashtable

Get all piwik users and their sites where they have the given access level

getUsersWithSiteAccess ( int idSite, UserAccess access ) : ArrayList

Get all piwik users which have the given access to the piwik site with the given id

hasSuperUserAccess ( ) : bool

Check if the current piwik user has super user access

setSuperUserAccess ( string userLogin, bool hasSuperUserAccess ) : Hashtable

Define if a piwik user with the given login has super user access

setUserAccess ( string userLogin, UserAccess access, int idSites ) : Hashtable

Set the access of a piwik user on a list of site ids

setUserPreference ( string userLogin, string preferenceName, object preferenceValue ) : Hashtable

Set a piwik user preference

updateUser ( string userLogin, string password = null, string email = null, string alias = null ) : Hashtable

Update a piwik user

userEmailExists ( string userEmail ) : bool

Check if a piwik user with given email exists

userExists ( string userLogin ) : bool

Check if a piwik user with given login exists

Protected Methods

Method Description
getPlugin ( ) : string

Method Details

addUser() public method

Add a piwik user
public addUser ( string userLogin, string password, string email, string alias = null ) : Hashtable
userLogin string
password string
email string
alias string
return System.Collections.Hashtable

deleteUser() public method

Delete a piwik user
public deleteUser ( string userLogin ) : Hashtable
userLogin string
return System.Collections.Hashtable

getPlugin() protected method

protected getPlugin ( ) : string
return string

getSitesAccessFromUser() public method

Get all sites and the specific access level (view or admin) where the given user has access to
public getSitesAccessFromUser ( string userLogin ) : ArrayList
userLogin string
return System.Collections.ArrayList

getTokenAuth() public method

Calculates the token auth by using a user login and a md5 hashed password
public getTokenAuth ( string userLogin, string md5Password ) : string
userLogin string
md5Password string
return string

getUser() public method

Get a piwik user by login
public getUser ( string userLogin ) : ArrayList
userLogin string
return System.Collections.ArrayList

getUserByEmail() public method

Get a piwik user by email
public getUserByEmail ( string userEmail ) : ArrayList
userEmail string
return System.Collections.ArrayList

getUserLoginFromUserEmail() public method

Get the login for a piwik user with a given email
public getUserLoginFromUserEmail ( string userEmail ) : string
userEmail string
return string

getUserPreference() public method

Get a piwik user preference
public getUserPreference ( string userLogin, string preferenceName ) : object
userLogin string
preferenceName string
return object

getUsers() public method

Get all piwik users with the given list of logins
public getUsers ( string userLogins = null ) : ArrayList
userLogins string
return System.Collections.ArrayList

getUsersAccessFromSite() public method

Get all piwik users and their access level for the piwik site with the given id
public getUsersAccessFromSite ( int idSite ) : ArrayList
idSite int
return System.Collections.ArrayList

getUsersHavingSuperUserAccess() public method

Get all piwik users which have super user access
public getUsersHavingSuperUserAccess ( ) : ArrayList
return System.Collections.ArrayList

getUsersLogin() public method

Get user logins of all registered piwik users
public getUsersLogin ( ) : ArrayList
return System.Collections.ArrayList

getUsersSitesFromAccess() public method

Get all piwik users and their sites where they have the given access level
public getUsersSitesFromAccess ( UserAccess access ) : Hashtable
access UserAccess
return System.Collections.Hashtable

getUsersWithSiteAccess() public method

Get all piwik users which have the given access to the piwik site with the given id
public getUsersWithSiteAccess ( int idSite, UserAccess access ) : ArrayList
idSite int
access UserAccess
return System.Collections.ArrayList

hasSuperUserAccess() public method

Check if the current piwik user has super user access
public hasSuperUserAccess ( ) : bool
return bool

setSuperUserAccess() public method

Define if a piwik user with the given login has super user access
public setSuperUserAccess ( string userLogin, bool hasSuperUserAccess ) : Hashtable
userLogin string
hasSuperUserAccess bool
return System.Collections.Hashtable

setUserAccess() public method

Set the access of a piwik user on a list of site ids
public setUserAccess ( string userLogin, UserAccess access, int idSites ) : Hashtable
userLogin string
access UserAccess
idSites int
return System.Collections.Hashtable

setUserPreference() public method

Set a piwik user preference
public setUserPreference ( string userLogin, string preferenceName, object preferenceValue ) : Hashtable
userLogin string
preferenceName string
preferenceValue object
return System.Collections.Hashtable

updateUser() public method

Update a piwik user
public updateUser ( string userLogin, string password = null, string email = null, string alias = null ) : Hashtable
userLogin string
password string
email string
alias string
return System.Collections.Hashtable

userEmailExists() public method

Check if a piwik user with given email exists
public userEmailExists ( string userEmail ) : bool
userEmail string
return bool

userExists() public method

Check if a piwik user with given login exists
public userExists ( string userLogin ) : bool
userLogin string
return bool