Make sure the organization for a delegator is not inserted as NULL in the database query adding the identity to the delegatee, as the database definition for the field is NOT NULL

This commit is contained in:
Jeroen van Meeuwen (Kolab Systems) 2013-02-14 09:54:15 -05:00
parent 0792829c3b
commit 41407069d1

View file

@ -623,7 +623,8 @@ class kolab_delegation_engine
// @TODO: "Delegatorname" or "Username on behalf of Delegatorname"?
$default['name'] = $delegator['realname'];
$default['email'] = $email;
$default['organization'] = $delegator['organization'];
// Database field for organization is NOT NULL
$default['organization'] = empty($delegator['organization']) ? '' : $delegator['organization'];
$this->rc->user->insert_identity($default);
}