summaryrefslogtreecommitdiffstats
path: root/lib/class/user.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r--lib/class/user.class.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index de759378..7649df31 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -699,23 +699,7 @@ class User extends database_object {
$total = $total + $r['size'];
}
- $divided = 0;
-
- while (strlen(floor($total)) > 3) {
- $total = ($total / 1024);
- $divided++;
- }
-
- switch ($divided) {
- default:
- case '1': $name = "KB"; break;
- case '2': $name = "MB"; break;
- case '3': $name = "GB"; break;
- case '4': $name = "TB"; break;
- case '5': $name = "PB"; break;
- } // end switch
-
- $this->f_useage = round($total,2) . $name;
+ $this->f_useage = format_bytes($total);
/* Get Users Last ip */
if (count($data = $this->get_ip_history(1))) {