Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
New Delegation in UserManager, SaveIdentity
Hello Mark,
I would like to have a new delegation in the UserManager class.
In
Similary to the delegation in the SaveIdentity function in this class.
I need this for the Predefined Attributes Extension. Possible?
I would like to have a new delegation in the UserManager class.
In
function SaveIdentity($User) {
before executing the UPDATE in Line 765:
$this->DelegateParameters['User'] = &$User;
$this->DelegateParameters['SqlBuilder'] = &$s;
$this->CallDelegate('PreDataUpdate');
Similary to the delegation in the SaveIdentity function in this class.
I need this for the Predefined Attributes Extension. Possible?
0
This discussion has been closed.
Comments
The UserManager is initiated before extensions are included on the account.php having the PostBackAction "ProcessIdentity". So GetDelegatesFromContext will get nothing.
Do I have to call AddToDelegate driectly on the UserManger Object? Then I have to make sure that the object exists and only fire AddToDelegate on this specific PostBackAction. That makes things complicated (in mind, not in code).
Or are you going to add $this->GetDelegatesFromContext(); in the first line of the SaveIdentity function?
Or is there a third way i didn't get yet?
* The extensions are loaded in the appg/init_vanilla.php file, which is included on line 15 of account.php.
* The UserManager object is created on line 22 of account.php.
I've added the lines to the UserManager class, but instead of "PreDataUpdate", I called the delegate "PreIdentityUpdate".
I'll check it again, why it does not work.
init_vanilla.php calls $Context->StartSession(); (Line 47, before including the extensions in Line 113)
In Session class Line 64 the UserManger is initialized:
$UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager');
Therefore line 24 in account.php
if (!@$UserManager) $UserManager = $Context->ObjectFactory->NewContextObject($Context, "UserManager");
does no re-initialisation, cause $UserManger allready exists.
What do I have to do?
Thanks.