do not save attributes if extension is not yet added
This commit is contained in:
		
							parent
							
								
									a3d444cd08
								
							
						
					
					
						commit
						162a76a7e0
					
				|  | @ -244,6 +244,24 @@ class asteriskAccount extends baseModule implements passwordService { | |||
| 		return $errors; | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	* Returns a list of modifications which have to be made to the LDAP account. | ||||
| 	* | ||||
| 	* @return array list of modifications | ||||
| 	* <br>This function returns an array with 3 entries: | ||||
| 	* <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) | ||||
| 	* <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) | ||||
| 	* <br>"add" are attributes which have to be added to LDAP entry | ||||
| 	* <br>"remove" are attributes which have to be removed from LDAP entry | ||||
| 	* <br>"modify" are attributes which have to been modified in LDAP entry | ||||
| 	*/ | ||||
| 	function save_attributes() { | ||||
| 		if (!in_array('AsteriskSIPUser', $this->attributes['objectClass'])) { | ||||
| 			return array(); | ||||
| 		} | ||||
| 		return $this->getAccountContainer()->save_module_attributes($this->attributes, $this->orig); | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	* Returns a list of PDF entries | ||||
| 	*/ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue