Dear all,is there a (cool) way to extend the "Account Flags" options on the Users? As far as I can see the values are stored in dynamic forms but I have no idea how to add my own flags hereany hint is welcome :)cheers-> osTicket v1.9.3

I haven't the foggiest idea what you mean by "account flags" on users.Please try asking your question in a different way, provide an example or a screen shot for clarity.

Ok, I'll try it this way ;)When you are in the Staff Panel and click on "Users" and then on a user itself. In the upper right corner is the "Manage Account" button for the selected user. In there you have "Account Flags" on the second tab of the overlay (screenshot attached)What I need is the ability to add an "Account Flag" so i can react on it's state for the user.Hope it's better this way :)

Bildschirmfoto 2014-08-14 um 10.34.31.png

Found a solution but it´s not nice. Anyway:"Model"include/class.user.php(around line 1030) in class UserAccountStatus add your new status to the constantsinclude/class.user.php(around line 818) add a function to check your new status (we will need it in the view file soon). Take isPasswdResetEnabled() as a draft here"Control Functions"include/class.user.php(around line 946) is the update function. Simply add your new flag to the array. The key of the new entry will be the name attribute of the checkbox in the view fileinclude/class.user.php(around line 1020): If your Flag should be "true" on user registration set it here (like the ones from password reset.). Else go on...and finally:include/staff/templates/user-account.tmpl.php:(around line 149) Duplicate one of the <div> tags with the checkbox. Rename the function in the condition to the one you created to check your new flag. Don't forget to change the name attribute for the checkbox.Voila, a new attribute witch is actually storing the state :)Any suggestions to do it better? Maybe there is an "official" way to do this but I didn´t find it....

Bildschirmfoto-2014-08-14-um-15.03.00.jpg

I'm not aware of any way to do this other than the way you did.

Write a Reply...