StrataFrame Forum

User record expansion?

http://forum.strataframe.net/Topic7037.aspx

By Ben Hayat - 2/20/2007

The application that I'm considering has to make many decisions based on "Who" has logged in. Therefore I'll need to add several new fields to the user record in order to make those decisions when a user logs in.



Is it possible/advisable to alter the structure of this file or is it better to create another file to have a ono-to-one relationship and add the fields in there?

Thanks!
By Trent L. Taylor - 2/21/2007

I would DEFINITELY NOT change the structure of the RBS tables.  Instead, create a custom login form and take advantage of the RBS events and create your own table that compliments the security to determine this type of information.  Changing the existing structures really is not recommended.
By Ben Hayat - 2/21/2007

Instead, create a custom login form and take advantage of the RBS events and create your own table that compliments the security to determine this type of information.




Trent, thanks for the reply...Do you have any sample that shows how a developer can create a new component from a SF component (especially if the SF component uses table) and then expand upon it? Frankly, I've not done this before and I'd appreciate if you could point me to right direction.



Thank you in advance!
By StrataFrame Team - 2/21/2007

We don't have a sample on how to add extra data to the Users table, but your best bet would be to just create your own table and link it back to the users.  Then, when the user changes, you can use the ID (pk) of the current user and go retrieve all of the custom user data that you need.
By Ben Hayat - 2/21/2007

We don't have a sample on how to add extra data to the Users table, but your best bet would be to just create your own table and link it back to the users.




Be, that was my original approach. However, Trent suggested to inherit from Login component and then add my table. My request for sample was on the login inheritance and not creating the table.



I'm still open to both suggestions. Which one will it lead to a better solution?
By Trent L. Taylor - 2/21/2007

Look at the Role Based Security sample, it has a custom login form.
By Ben Hayat - 2/21/2007

Thanks Trent; I'll look into it!