Returns an etsis_Person object with the information connected to the unique person’s ID.
<?php $person = get_person($person, $object); ?>
$person (string) (required) Unique person ID or person array of who’s data should be retrieved and returned.
$object (bool) (optional) It set true, the data will return as an object or an array if false.
(mixed) etsis_Person object or array on success or false if failed.
Example of return data as an object.
$person = get_person(12); echo "Mickey's last name is " . $person->lname;
Example of returning data as an array.
$person = get_person(12, false); echo "Mickey's last name is " . $person['lname'];
var_dump of $person = get_person(12); as an object
stdClass::__set_state(array( 'personID' => '12', 'altID' => NULL, 'uname' => 'mousem', 'prefix' => 'Mr', 'personType' => 'STU', 'fname' => 'Mickey', 'lname' => 'Mouse', 'mname' => '', 'email' => 'mousem@eb.edu', 'ssn' => '19810705', 'dob' => '0000-00-00', 'veteran' => '0', 'ethnicity' => 'Other', 'gender' => 'M', 'emergency_contact' => '', 'emergency_contact_phone' => '', 'photo' => NULL, 'password' => '$2a$08$xDA1XVueCIlk1l0beaQrHuGqBZn8T5P6aQhVX.sKQtPsvyBD7Hlj.', 'status' => 'A', 'auth_token' => 'NULL', 'approvedDate' => '2014-03-01 00:00:00', 'approvedBy' => '1', 'LastLogin' => '2015-09-04 01:42:35', 'LastUpdate' => '2015-09-07 15:05:25', ))
var_dump of $person = get_person(12, false); as an array
array ( 'personID' => '12', 'altID' => NULL, 'uname' => 'mousem', 'prefix' => 'Mr', 'personType' => 'STU', 'fname' => 'Mickey', 'lname' => 'Mouse', 'mname' => '', 'email' => 'mousem@eb.edu', 'ssn' => '19810705', 'dob' => '0000-00-00', 'veteran' => '0', 'ethnicity' => 'Other', 'gender' => 'M', 'emergency_contact' => '', 'emergency_contact_phone' => '', 'photo' => NULL, 'password' => '$2a$08$xDA1XVueCIlk1l0beaQrHuGqBZn8T5P6aQhVX.sKQtPsvyBD7Hlj.', 'status' => 'A', 'auth_token' => 'NULL', 'approvedDate' => '2014-03-01 00:00:00', 'approvedBy' => '1', 'LastLogin' => '2015-09-04 01:42:35', 'LastUpdate' => '2015-09-07 15:05:25', )
Since 6.2.0
get_person() is located in app/functions/person-function.php.