I run roundcube on accounts with unlimited storage without root access, meaning no values to access for account usage. I have written php that opens the imap folders and returns a total. instead of showing usage "unlimited" in the lower left, I would like to be able to have my php code be run for the logged in user, to report the total usage for the account.
my initial thought is some addition to the login screen code that passes the username and password entries also to a bit of code accessed by that area of the interface, thereafter directing it to the php code to measure the account, passing along the variables of the username and password entered at login. also because of the overhead consumed by measuring the account, that the php action in that area only be run at login, not with each refresh by the interface.
alternatively, if the login could pass the info to the php which could populate a user specific html, and pass to the area in the interface where quota is displayed, allow an iframe or such to retrieve the then populated user specific html page to display in that area. then the system refresh would just be grabbing the html result page every time, and I could add in a button to re-run the php on demand.