Infoblox::Grid::Admin::User::Profile - User Profile object.
Object that represents the user profile of the admin that is logged in.
This section describes all the methods in the Infoblox::Session module that you can apply to a User Profile object.
Use this method to retrieve an object from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
my $user_profile = $session->get(object => "Infoblox::Grid::Admin::User::Profile");
This section describes all the methods that you can use to set and retrieve the attribute values of a User Profile object.
Use this method to retrieve the Admin Group object to which the admin belongs. An admin user can belong to only one admin group at a time. This attribute is read-only and cannot be modified.
None
The method returns the attribute value as Infoblox::Grid::Admin::Group object.
#Get admin_group my $admin_group = $user_profile->admin_group();
Use this method to retrieve the number of days left before the admin's password expires. This attribute is read-only and cannot be modified.
None
The method returns the attribute value. -1 means that the password doesn't expire.
#Get days_to_expire my $days_to_expire = $user_profile->days_to_expire();
Use this method to set or retrieve the email address of the admin.
String with the email address of the admin.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get email my $email = $user_profile->email(); #Modify email $user_profile->email("usertest\@infoblox.com");
Use this method to set or retrieve the flag that indicates whether extensible attribute values will be returned by global search or not.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to set global_search_on_ea flag or 'false' to unset it.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get global_search_on_ea my $global_search_on_ea = $user_profile->global_search_on_ea();
#Modify global_search_on_ea $user_profile->global_search_on_ea('true');
Use this method to retrieve the timestamp of when the admin last logged in. This attribute is read-only and cannot be modified.
None
The method returns the timestamp.
#Get last_login my $last_login = $user_profile->last_login();
Use this method to specify the current password that will be replaced by a new password. To change a password in the database, you must provide both the current and new password values. This is a write-only attribute.
Current password that the admin uses to log in.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
#Modify password $user_profile->old_password("infoblox");
Use this method to set the new password of the admin. To change a password in the database, you must provide both the current and new password values. This is a write-only attribute.
New password of the admin.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
#Modify password $user_profile->password("infobloxone");
Use this method to set or retrieve the number of lines of data a table or a single list view can contain.
The number of lines, which can be from 10 to 256.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get table_size my $table_size = $user_profile->table_size(); #Modify table_size $user_profile->table_size(20);
Use this method to set or retrieve the time zone of the admin user.
The UTC string that represents the time zone. For example "(UTC - 6:00) Central Time (US and Canada)".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get time zone my $time_zone = $user_profile->time_zone(); #Modify time zone $user_profile->time_zone("(UTC - 6:00) Central Time (US and Canada)");
Use this method to retrieve the admin type. This attribute is read-only and cannot be modified.
None
The method returns the attribute value as "LOCAL" or "REMOTE".
#Get user_type my $user_type = $user_profile->user_type();
The following sample code demonstrates the different functions that can be applied to an object. This sample also includes error handling for the operations.
#Preparation prior to a User Profile object insertion
#PROGRAM STARTS: Include all the modules that will be used use strict; use Infoblox;
#Create a session to the Infoblox appliance
my $session = Infoblox::Session->new( master => "192.168.1.2", #appliance host ip username => "admin", #appliance user login password => "infoblox" #appliance password );
unless ($session) { die("Construct session failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Session created successfully\n";
#Get a User Profile object
#Get the user profile object from Infoblox appliance through a session my $user_profile = $session->get(object => "Infoblox::Grid::Admin::User::Profile);
unless ($user_profile) { die("Get User Profile object failed: ", $session->status_code() . ":" . $session->status_detail()); } ####PROGRAM ENDS####
Infoblox Inc. http://www.infoblox.com/
Infoblox::Grid::Admin::Group,Infoblox::Session->get(),Infoblox::Session
Copyright (c) 2017 Infoblox Inc.