Top |
int | account-type | Read |
gboolean | automatic-login | Read |
char * | Read | |
char * | home-directory | Read |
char * | icon-file | Read |
gboolean | is-loaded | Read |
char * | language | Read |
gboolean | local-account | Read |
char * | location | Read |
gboolean | locked | Read |
int | login-frequency | Read |
GVariant * | login-history | Read |
gint64 | login-time | Read |
gboolean | nonexistent | Read |
char * | password-hint | Read |
int | password-mode | Read |
char * | real-name | Read |
char * | shell | Read |
gboolean | system-account | Read |
int | uid | Read |
char * | user-name | Read |
char * | x-session | Read |
gint act_user_collate (ActUser *user1
,ActUser *user2
);
Organize the user by login frequency and names.
ActUserAccountType
act_user_get_account_type (ActUser *user
);
Retrieves the account type of user
.
gboolean
act_user_get_automatic_login (ActUser *user
);
Returns whether or not ActUser is automatically logged in at boot time.
const char *
act_user_get_email (ActUser *user
);
Retrieves the email address set by user
.
const char *
act_user_get_home_dir (ActUser *user
);
Retrieves the home directory for user
.
const char *
act_user_get_icon_file (ActUser *user
);
Returns the path to the account icon belonging to user
.
const char *
act_user_get_language (ActUser *user
);
Returns the value of “language”.
const char *
act_user_get_location (ActUser *user
);
Retrieves the location set by user
.
gboolean
act_user_get_locked (ActUser *user
);
Returns whether or not the ActUser account is locked.
int
act_user_get_login_frequency (ActUser *user
);
Returns the number of times user
has logged in.
const GVariant *
act_user_get_login_history (ActUser *user
);
Returns the login history for user
.
gint64
act_user_get_login_time (ActUser *user
);
Returns the last login time for user
.
guint
act_user_get_num_sessions (ActUser *user
);
Get the number of sessions for a user that are graphical and on the same seat as the session of the calling process.
guint
act_user_get_num_sessions_anywhere (ActUser *user
);
Get the number of sessions for a user on any seat of any type.
See also act_user_get_num_sessions()
.
(Currently, this function is only implemented for systemd-logind. For ConsoleKit, it is equivalent to act_user_get_num_sessions.)
const char *
act_user_get_object_path (ActUser *user
);
Returns the user accounts service object path of user
,
or NULL
if user
doesn't have an object path associated
with it.
void act_user_get_password_expiration_policy (ActUser *user
,gint64 *expiration_time
,gint64 *last_change_time
,gint64 *min_days_between_changes
,gint64 *max_days_between_changes
,gint64 *days_to_warn
,gint64 *days_after_expiration_until_lock
);
Get the password expiration policy for a user.
Note this function is synchronous and ignores errors.
user |
the user object to query. |
|
expiration_time |
location to write time users password expires. |
[out][optional] |
last_change_time |
location to write time users password was last changed. |
[out][optional] |
min_days_between_changes |
location to write minimum number of days needed between password changes. |
[out][optional] |
max_days_between_changes |
location to write maximum number of days password can stay unchanged. |
[out][optional] |
days_to_warn |
location to write number of days to warn user password is about to expire. |
[out][optional] |
days_after_expiration_until_lock |
location to write number of days account will be locked after password expires. |
[out][optional] |
const char *
act_user_get_password_hint (ActUser *user
);
Retrieves the password hint set by user
.
ActUserPasswordMode
act_user_get_password_mode (ActUser *user
);
Retrieves the password mode of user
.
const char *
act_user_get_primary_session_id (ActUser *user
);
Returns the id of the primary session of user
, or NULL
if user
has no primary session. The primary session will always be
graphical and will be chosen from the sessions on the same seat as
the seat of the session of the calling process.
const char *
act_user_get_real_name (ActUser *user
);
Retrieves the display name of user
.
gboolean
act_user_get_saved (ActUser *user
);
Returns whether or not the ActUser account has retained state in accountsservice.
const char *
act_user_get_session (ActUser *user
);
Returns the path to the configured session for user
.
const char *
act_user_get_session_type (ActUser *user
);
Returns the type of the configured session for user
.
const char *
act_user_get_shell (ActUser *user
);
Retrieves the shell assigned to user
.
const char *
act_user_get_user_name (ActUser *user
);
Retrieves the login name of user
.
const char *
act_user_get_x_session (ActUser *user
);
Returns the path to the configured X session for user
.
gboolean
act_user_is_loaded (ActUser *user
);
Determines whether or not the user object is loaded and ready to read from.
“is-loaded” property must be TRUE
before calling
act_user_manager_list_users()
gboolean
act_user_is_local_account (ActUser *user
);
Retrieves whether the user is a local account or not.
gboolean
act_user_is_logged_in (ActUser *user
);
Returns whether or not ActUser is currently graphically logged in on the same seat as the seat of the session of the calling process.
gboolean
act_user_is_logged_in_anywhere (ActUser *user
);
Returns whether or not ActUser is currently logged in in any way
whatsoever. See also act_user_is_logged_in()
.
(Currently, this function is only implemented for systemd-logind. For ConsoleKit, it is equivalent to act_user_is_logged_in.)
gboolean
act_user_is_nonexistent (ActUser *user
);
Retrieves whether the user is nonexistent or not.
gboolean
act_user_is_system_account (ActUser *user
);
Returns whether or not ActUser represents a 'system account' like 'root' or 'nobody'.
void act_user_set_account_type (ActUser *user
,ActUserAccountType account_type
);
Changes the account type of user
.
Note this function is synchronous and ignores errors.
void act_user_set_automatic_login (ActUser *user
,gboolean enabled
);
If enabled is set to TRUE
then this user will automatically be logged in
at boot up time. Only one user can be configured to auto login at any given
time, so subsequent calls to act_user_set_automatic_login()
override previous
calls.
Note this function is synchronous and ignores errors.
void act_user_set_email (ActUser *user
,const char *email
);
Assigns a new email to user
.
Note this function is synchronous and ignores errors.
void act_user_set_icon_file (ActUser *user
,const char *icon_file
);
Assigns a new icon for user
.
Note this function is synchronous and ignores errors.
void act_user_set_language (ActUser *user
,const char *language
);
Assigns a new locale for user
, setting “language”.
Note this function is synchronous and ignores errors.
void act_user_set_languages (ActUser *user
,const char * const *languages
);
Assigns preferred languages for user
, setting “languages”, and
overriding “language” with the first item in the list if there is one.
Note this function is synchronous and ignores errors.
void act_user_set_location (ActUser *user
,const char *location
);
Assigns a new location for user
.
Note this function is synchronous and ignores errors.
void act_user_set_locked (ActUser *user
,gboolean locked
);
Note this function is synchronous and ignores errors.
void act_user_set_password (ActUser *user
,const gchar *password
,const gchar *hint
);
Changes the password of user
to password
.
hint
is displayed to the user if they forget the password.
Note this function is synchronous and ignores errors.
void act_user_set_password_mode (ActUser *user
,ActUserPasswordMode password_mode
);
Changes the password of user
. If password_mode
is
ACT_USER_PASSWORD_MODE_SET_AT_LOGIN then the user will
be asked for a new password at the next login. If password_mode
is ACT_USER_PASSWORD_MODE_NONE then the user will not require
a password to log in.
Note this function is synchronous and ignores errors.
void act_user_set_real_name (ActUser *user
,const char *real_name
);
Assigns a new name for user
.
Note this function is synchronous and ignores errors.
void act_user_set_session (ActUser *user
,const char *session
);
Assigns a new session for user
.
Note this function is synchronous and ignores errors.
void act_user_set_session_type (ActUser *user
,const char *session_type
);
Assigns a type to the session for user
.
Note this function is synchronous and ignores errors.
void act_user_set_user_name (ActUser *user
,const char *user_name
);
Assigns a new username for user
.
Note this function is synchronous and ignores errors.
void act_user_set_x_session (ActUser *user
,const char *x_session
);
Assigns a new x session for user
.
Note this function is synchronous and ignores errors.
“account-type”
property “account-type” int
The account type for this user.
Owner: ActUser
Flags: Read
Allowed values: [0,1]
Default value: 0
“automatic-login”
property “automatic-login” gboolean
Automatic Login.
Owner: ActUser
Flags: Read
Default value: FALSE
“email”
property “email” char *
The email address for this user.
Owner: ActUser
Flags: Read
Default value: NULL
“home-directory”
property “home-directory” char *
The home directory for this user.
Owner: ActUser
Flags: Read
Default value: NULL
“icon-file”
property “icon-file” char *
The path to an icon for this user.
Owner: ActUser
Flags: Read
Default value: NULL
“is-loaded”
property “is-loaded” gboolean
Determines whether or not the user object is loaded and ready to read from.
Owner: ActUser
Flags: Read
Default value: FALSE
“language”
property “language” char *
The user’s locale, in the format
language[_territory][.codeset][@modifier]
, where language
is an
ISO 639 language code, territory
is an ISO 3166 country code, and
codeset
is a character set or encoding identifier like ISO-8859-1
or UTF-8
; as specified by setlocale(3)
).
The locale may be the empty string, which means the user is using the system default locale.
The property may be NULL
if it wasn’t possible to load it from the
daemon.
[nullable]
Owner: ActUser
Flags: Read
Default value: NULL
“local-account”
property “local-account” gboolean
Local Account.
Owner: ActUser
Flags: Read
Default value: FALSE
“location”
property “location” char *
The location of this user.
Owner: ActUser
Flags: Read
Default value: NULL
“login-frequency”
property “login-frequency” int
login frequency.
Owner: ActUser
Flags: Read
Allowed values: >= 0
Default value: 0
“login-history”
property “login-history” GVariant *
The login history for this user.
Owner: ActUser
Flags: Read
Allowed values: GVariant<a(xxa{sv})>
Default value: NULL
“login-time”
property “login-time” gint64
The last login time for this user.
Owner: ActUser
Flags: Read
Allowed values: >= 0
Default value: 0
“nonexistent”
property “nonexistent” gboolean
Determines whether or not the user object represents a valid user account.
Owner: ActUser
Flags: Read
Default value: FALSE
“password-hint”
property “password-hint” char *
Hint to help this user remember his password.
Owner: ActUser
Flags: Read
Default value: NULL
“password-mode”
property “password-mode” int
The password mode for this user.
Owner: ActUser
Flags: Read
Allowed values: [0,2]
Default value: 0
“real-name”
property “real-name” char *
The real name to display for this user.
Owner: ActUser
Flags: Read
Default value: NULL
“shell”
property “shell” char *
The shell for this user.
Owner: ActUser
Flags: Read
Default value: NULL
“system-account”
property “system-account” gboolean
System Account.
Owner: ActUser
Flags: Read
Default value: FALSE
“uid”
property “uid” int
The UID for this user.
Owner: ActUser
Flags: Read
Allowed values: >= 0
Default value: 0
“user-name”
property “user-name” char *
The login name for this user.
Owner: ActUser
Flags: Read
Default value: NULL
“changed”
signalvoid user_function (ActUser *actuser, gpointer user_data)
Emitted when the user accounts changes in some way.
Flags: Run Last
“sessions-changed”
signalvoid user_function (ActUser *actuser, gpointer user_data)
Emitted when the list of sessions for this user changes.
Flags: Run Last