1) The documentation has things like this:
$auth->createOperation('readPost','read a post');
$role=$auth->createRole('reader');
$role->addChild('readPost');
My question: Can I have a space in the operation name? Instead of 'readPost' can I have 'Read Post'? For example:
$auth->createOperation('Read Post','read a post');
$role=$auth->createRole('reader');
$role->addChild('Read Post');
Would that be ok?
2) The roles and operations are all stored in the database, right? So I only have to create a role/operation once in the life of my application? (until I delete it)
3) To assign a role, the doc says: $auth->assign('reader','readerA');
Is the second parameter ('readerA') supposed to be the user name? What if the user changes his user name? Is it not possible to use the numeric user id that I store internally and never changes for a user?
Thanks.