Comments (5)
Good point. I will have a look ...
from opencart-overclocked.
Alright, I had a look today ...
I can see the practicality of having a getGroupName() function in system/library/user.php, but I don't think it is being used enough to justify its addition to the user class.
However, there is a function in the admin user model file to get the User Group Name.
It requires 2 parameters: $user_id and $user_group_id.
It can be called anywhere under admin provided the model file is loaded:
$group_name = $this->model_user_user->getUserGroup($user_id, $user_group_id);
So I will not add it to the user class at this stage.
from opencart-overclocked.
I have the case in one of my OC extension where i needed current user group id and group name.
In your 1.7, group ID is already set at login. Having group name in the same query is easy.
This prevent doing +1 query.
With getUserGroup($user_id, $user_group_id), you need first to have current user group id (+1 query on OC).
from opencart-overclocked.
All you have to do is change
SELECT permission
to
SELECT name, permission
and add a function getGroupName() in library/user.php
Cost nothing.
from opencart-overclocked.
Yes, I actually tried that, but all I had as a result was a Url.
I'm not exactly sure why.
I will try to implement this again in time.
from opencart-overclocked.
Related Issues (20)
- Deselect all button issue HOT 1
- Main Slider Arrows on Mobile HOT 2
- Cart Issue HOT 3
- Frontend Adjustments HOT 3
- Template image doesn't show in Settings
- .htaccess Security Hardening HOT 2
- Text correction
- Catalog Mobile Issue HOT 3
- Mailing System needs updating
- Admin Search Filters Products version 1.11.0 returns no results - Fix
- Frontend Search Returns No results v.1.11.0 - Fix HOT 1
- Admin Search Filter Categories returns no results - Fix HOT 1
- Product Image + Label display issue
- SwipeBox lightbox has stopped working. HOT 5
- Customers Online Issue
- Online Customers Report HOT 4
- Reflected XSS in OpenBay Template HOT 2
- Remove product from Featured list is not working - Fix
- Inconsistent manufacturer status between product page and manufacturer page.
- Notify Customer not working HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencart-overclocked.