Dear all,

1. Once my user has logged in, I'd like to store the user name in a session
variable for display in a template. How do I do this in my LoginAction? I
tried this:

$this->getContext()->getStorage()->write('ADMIN_U', $u);

2. I need some advice on passing record IDs around in update actions.
Currently, for my CRUD module, I have URLs of the form

/admin/listing/edit/1

When this is requested, the Action::executeRead() method reads the record
using the ID and generates a form with the contents of the record pre-filled
so the user can edit and resubmit it. On resubmission, the
Action::executeWrite() method reads the new input, executes an UPDATE query
and updates the record with the new input.

My question is, when resubmitting the form, what is the best way to pass the
record ID back to the Action::executeWrite() method? Currently, I'm passing
it on the URL. I could instead set it as a hidden field in the form. But in
either case, a user could change it in the page source code and thereby
perform an update on a different record instead. Is there a way to avoid
this? How?

Many thanks for your assistance!

Vikram
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to