diff --git a/airtime_mvc/application/models/Users.php b/airtime_mvc/application/models/Users.php
index 05b057ba2..404dd8988 100644
--- a/airtime_mvc/application/models/Users.php
+++ b/airtime_mvc/application/models/Users.php
@@ -159,7 +159,25 @@ class User {
public static function getUsersDataTablesInfo($datatables_post) {
$fromTable = "cc_subjs";
- return StoredFile::searchFiles($fromTable, $datatables_post);
+
+ // get current user
+ $username = "";
+ $auth = Zend_Auth::getInstance();
+
+ if ($auth->hasIdentity()) {
+ $username = $auth->getIdentity()->login;
+ }
+
+ $res = StoredFile::searchFiles($fromTable, $datatables_post);
+
+ // mark record which is for the current user
+ foreach($res['aaData'] as &$record){
+ if($record[1] == $username){
+ $record[5] = "self";
+ }
+ }
+
+ return $res;
}
public static function getUserData($id){
diff --git a/airtime_mvc/public/js/airtime/user/user.js b/airtime_mvc/public/js/airtime/user/user.js
index 6a518fdc1..c29abbb9c 100644
--- a/airtime_mvc/public/js/airtime/user/user.js
+++ b/airtime_mvc/public/js/airtime/user/user.js
@@ -36,7 +36,11 @@ function removeUserCallback(row_id, nRow){
function rowCallback( nRow, aData, iDisplayIndex ){
$(nRow).click(function(){rowClickCallback(aData[0])});
- $('td:eq(4)', nRow).append( '').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData[0], nRow)});
+ if( aData[5] != "self"){
+ $('td:eq(4)', nRow).append( '').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData[0], nRow)});
+ }else{
+ $('td:eq(4)', nRow).empty();
+ }
if ( aData[4] == "A" )
{