In the first part of this post, I wanted to show how easy it is to access information from the currently logged in user and store this information in an action the user executes (who created/changed a record).
Now, what happens, if we have several groups of users (roles)? Well, I could create some IF..ELSE block for each role, but this would probably be not a good idea. A much better approach is to create a base class within the model and inherit all roles from this. So, the model could for instance look like this: