I just tried to change the standard access level, when a user creates a new category in the frontend.
So I found some code, which doesn't make sense to me:
In controllers/user.php are the standard values set:
Here I tried to change the access level, but nothing happend. It took me a while to find, that the accesslevel is set again in models/user.php// Set default values
$post['access'] = 0;
//$post['access'] = 1;
$post['parent_id'] = 0;
$post['image_position'] = 'left';
$post['published'] = 1;
$post['accessuserid'] = '-1';
$post['uploaduserid'] = $this->_user->id;
$post['deleteuserid'] = $this->_user->id;
$post['userfolder'] = $this->_userFolder;
$post['owner_id'] = $this->_user->id;
Code: Select all
function store($data) {
if ($data['alias'] == '') {
$data['alias'] = $data['title'];
}
$data['alias'] = PhocaGalleryText::getAliasName($data['alias']);
$data['access'] = 1;
I've change it now for me, but probably it helps other people.
Or it would be a good thing to integrate it in the settings directly. If I find the time, Il will try to write it.