Hello,
I would like to add custom attributes to the class User. Because it is not defined in XML, I can't use the XML definition to modify it. Is there another way to do it without modifying the iTop code?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Standard User classes are in PHP on purpose so they can't be customized.
You could always crete your own class extending UserLocal or else, and do it in XML, but you would have to migrate all your existing users. Also it might not work with some extensions, so I don't really recommend it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Jeffrey,
I wanted to add a last_login attribute and a stopwatch related to it. I want to send email notification when a user didn't log in since X days.
I know of the configuration 'log_usage'. But it doesn't help me to send email notifications.
As you wrote, I'm thinking of creating an extra class which is pointing to the user.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I would like to add custom attributes to the class User. Because it is not defined in XML, I can't use the XML definition to modify it. Is there another way to do it without modifying the iTop code?
Thanks!
Hello Dave,
Standard User classes are in PHP on purpose so they can't be customized.
You could always crete your own class extending UserLocal or else, and do it in XML, but you would have to migrate all your existing users. Also it might not work with some extensions, so I don't really recommend it.
What kind of attributes do you want to add?
Depending on your use case - maybe you just want to create another class instead with an AttributeExternalKey pointing to the user?
Hello Molkobain,
that's sad. Then I have to find another solution.
Thank you very much for your fast reply!
Hello Jeffrey,
I wanted to add a last_login attribute and a stopwatch related to it. I want to send email notification when a user didn't log in since X days.
I know of the configuration 'log_usage'. But it doesn't help me to send email notifications.
As you wrote, I'm thinking of creating an extra class which is pointing to the user.