Support - Account Reviews (Role Field)

I have implemented Account Reviews using the GitHub PHP scripts to pull accounts from various AD Groups and this is working fine for Accounts and Last Logon time as per the original script, but I would like to populate the Role field from the Job Title attribute in AD. I have tested a modified script to do this and it works to a certain degree! Some of our accounts don’t have the Job Title populated and therefore blank. My question is, does Eramba require a NULL value to be populated where an AD field is blank and if so how can this be handled in the script?

i would not use NULL , i rather write some text as a string…something like “empty” or whatever because as far as i remember all fields on the feed are mandatory ?

Fully agree about NULL values, but that’s what the GitHub script uses to populate the ‘Role’ field.
The script below handles the last logon date as below using an if statement, but what I can’t manage to figure out is how to add another if statement to handle missing values from the ‘Title’ attribute in AD.

# this parses the response on a CSV format
	foreach($info as $id) {
		# this is really not pretty but for now is all there is
		# end of the unpretty code

		if ( !empty($login) ) {
			if ($ad_time > 0) {
				$pretty_date="Last successful logon on ".date('d-M-Y H:i:s',$ad_time/10000000-11644473600)."";
			} else {
				$pretty_date="Unknown or never logged in";
			echo "$login,**$title**,$pretty_date\n";	

} else {
	echo "we lost the bind, this should not happen..exiting\n";

I have added in a new row of code and also added the $title (** **) and it works fine and outputs to the CSV, but I need to be able to add in some text as a string (No Job Title assigned) where the Title is missing.
Any help in adapting the current if statement would be appreciated as I am not that good with PHP.