Hi,
I've had a look at this over the weekend, not had any luck with it?
Would anyone be able to propose a possible solution?
On 5/18/07, Tane Piper <[EMAIL PROTECTED]> wrote:
> I'm adding user levels to my content, as some I only want to show some
> content to certain users. I'm using othAuth, and this is how I
> currently have my function:
>
> function index()
> {
> if (!empty($this->othAuth->group('level')))
> {
> $level = $this->othAuth->group('level');
> } else {
> $level = 0;
> }
>
> // Overide paginate limit, may need to change
> $this->cacheAction = '1 hour';
> $this->passedArgs['limit'] = 1;
> $this->set('posts', $this->paginate(null,
> array('Post.published'=>1,
> 'Post.access_level' => '<= ' . $level )));
> }
>
> The problem is that when I try and read the user's group level, I get
> this error:
>
> Fatal error: Can't use method return value in write context in
> /home/digitalspaghetti/workspace/webrocket/controllers/posts_controller.php
> on line 19
>
> Can anyone suggest a way around it? I'd rather do the check in the
> controller (or the model) so that the data isn't pulled, rather than
> reading the content and not displaying it with the helper.
>
> Tane
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---