Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Code actions have access to $trigger, $user, and $vars variables. The $vars variable actually has direct access to the variables sent by the trigger as well and if set to be references under parameters can actually be modified by reference. There's a lot of nifty usages that can come of this.I know you aren't here to offer customised code but I just needed that helping hand to show me what was possible and correct syntax as I had no idea you could use $user-> set $user->store etc as would have written it all from scratch.
It's using a rename so you don't need to worry about duplicate copies of a file. The old file anytime a profile is updated is also automatically deleted when a new file is uploaded so there should be no issues with leftover files. If it's not cleaning up old files please let me know and will take a look at source to see if that process maybe failing.I want to delete previous versions of the file upload as well as have noticed that the file upload doesnt do that so I can probably do that now using a onbeforeupdate type action to grab the old filename.
Donations are always welcomed and appreciated. See the donation plan on the subscription tab of your profile. Glad I could helpPLEASE DO PM me if you have a paypal email address I can send you some beer money to!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thank youBeer money just donated thanks again!
Unfortunately no, not at this time. $trigger is the auto action object and $user is the CB user object built from the trigger. $vars however contains var1, var2, var3, etc.. as an array which outputs each variable sent to the trigger. So $vars gives you whatever the first variable is for the trigger used. This can be useful if lets say the trigger has an object you want to manipulate by reference. You could in theory do $vars->set( 'name', $value ); type usage.Is their any online documentation about all the CB functions etc you can use... $trigger, $user, and $vars
Please Log in or Create an account to join the conversation.