Subversion Repositories php_users

Rev

Rev 17 | Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 18
Line 360... Line 360...
360
      }
360
      }
361
      
361
      
362
      public function updatePermissions ( $userID,$newData ) {
362
      public function updatePermissions ( $userID,$newData ) {
363
         $query = '';
363
         $query = '';
364
         foreach ( $newData as $key => $value ) {
364
         foreach ( $newData as $key => $value ) {
365
            $query = "insert into _permissions ( _user_id,_permission_id,value) select $userID, _permission_id, $value from _permissions where name = 'key' on duplicate key update value = $value";
365
            $query = "insert into _users_permissions ( _user_id,_permission_id,value) select $userID, _permission_id, $value from _permissions where name = '$key' on duplicate key update value = $value";
366
            $this->doSQL( $query, true );
366
            $this->doSQL( $query, 'In updatePermissions' );
367
         }
367
         }
368
      } // update
368
      } // update
369
 
369
 
370
}
370
}
371
 
371