Upon login, users should redirect to /users/view_summary/.
I'm getting the user_id from the Session component. I tried just
concatenate or pass extra variable to $this->Auth->loginRedirect, but
all my ideas have failed. Is this something we can do in cakephp?
This is my AppController::beforeFilt
In methods of controllers, there are usually many checks for "doing
the right thing".
For instance, I check if user is accessing the right data.
However, I'm wondering what is the best way to return or exit from
these methods when errors do occur. I've been using just simple return
statement, bu
never mind. I get it!
Thanks!
On May 18, 12:05 pm, Brian Lee wrote:
> But how does this prevent user from accessing a random course?
>
> such as typing localhost/courses/view/123
> and hoping to see what he gets for course_id 123.
>
> I know that paginate would restrict wh
the
> courses of the current user... ex:
>
> $cond = array('Course.user_id' => $Current_user_id);
> $this->set('courses', $this->paginate('Course', $cond));
>
> Brian Lee escribió:
>
> > So, here is how my application works:
>
&g
So, here is how my application works:
1. I have users (just like any other apps)
2. I have courses that each user can create
Upon login, user will view the list of courses that she created.
I got that to work.
However, now the problem is, I don't know the simple, neat way to
block user from acc
nvm.
I found what I did wrong.
I forgot to allow 'logout'.
Also, for my ACL tables, it let admin to do anything, whereas other
users were limited.
Problem solved :)
On May 18, 6:17 am, Brian Lee wrote:
> Hello,
>
> I have a debug code that prints out values of
>
Hello,
I have a debug code that prints out values of
$this->Auth->user('id')
$this->Auth->user('name')
inside a controller's beforeRender().
When I login, it shows that I'm logged in as a person.
However, when I logout, it shows that I'm still logged in as the
person I was logged in.
This only