Adding page owner programmatically

Permalink
Hi,

I want to add a page owner programmatically but I can't find any method in the page object to do that.

So my question is, how can I do that ?

 
Remo replied on at Permalink Best Answer Reply
Remo
It's part of the data array, just use the key "uID":

$data = array();
$data['cName']        = 'lovely new page';
$data['cDescription'] = 'very lovely new page';
$data['uID']         = 123;
$newPage = $parentPage->add($ct, $data);
nielsb85 replied on at Permalink Reply
Thanks Remo!
I totally missed that when I was searching for it:).