I am writing a plugin that I am triggering for onDeploy_OK. I am trying to use either JFile::copy() or just copy() to transfer the users profile image to a folder of the new site they created but the file doesn't exist yet.
Code: |
$fileLives = JFile::exists($profile_dest);
if(!$fileLives){
return JError::raiseWarning( 500, JText::_('File does not exist '. $enteredvalues['id']) );
}else{
JError::raiseWarning( 500, JText::_('IT DID EXIST '. $enteredvalues['id']) );
}
|
The result is always false so I'm wondering if this function fires AFTER the files are all copied over? Or is there another way? I even tried renaming the function to someting else like doFileCopy(&$enteredvalues) and then calling it under
Code: |
$this->_onDeploy_OK( $enteredvalues);
|
near the bottom of saveSlave() inside
Code: |
components/com_multisites/views/slaves/view.php
|
hoping it would trigger AFTER files are moved but still get the same result. How can I run this code AFTER I know the files have been transferred?