check if RDN attribute is set
This commit is contained in:
parent
4458bd627f
commit
24981e396a
|
@ -225,6 +225,18 @@ class eduPerson extends baseModule {
|
||||||
$this->messages['affiliation'][0] = array('ERROR', _('Account %s:') . ' eduPerson_affiliation', _('Please enter a valid list of affiliations.'));
|
$this->messages['affiliation'][0] = array('ERROR', _('Account %s:') . ' eduPerson_affiliation', _('Please enter a valid list of affiliations.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions return true if all needed settings are done.
|
||||||
|
*
|
||||||
|
* @return boolean true, if all is ok
|
||||||
|
*/
|
||||||
|
function module_complete() {
|
||||||
|
if (($this->getAccountContainer()->rdn == 'eduPersonPrincipalName') && !isset($this->attributes['eduPersonPrincipalName'][0])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the HTML meta data for the main account page.
|
* Returns the HTML meta data for the main account page.
|
||||||
*
|
*
|
||||||
|
|
|
@ -668,6 +668,12 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isset($this->attributes['sn'][0]) || ($this->attributes['sn'][0] == '')) return false;
|
if (!isset($this->attributes['sn'][0]) || ($this->attributes['sn'][0] == '')) return false;
|
||||||
|
$modules = $_SESSION['config']->get_AccountModules($this->get_scope());
|
||||||
|
if (!in_array('posixAccount', $modules)) {
|
||||||
|
if (($this->getAccountContainer()->rdn == 'uid') && !isset($this->attributes['uid'][0])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue