Members: 16,996
Threads: 38,845
Posts: 159,389
Online: 18

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 13.09.2004, 02:38   #1 (permalink)
Senior Mamber
 
drcorbeille's Avatar
 
Join Date: Aug 2004
Location: Sierre, CH
Posts: 157
drcorbeille is on a distinguished road
Default Determine User's privileges

How can I know if the current user is an admin from within a module. I'd like to adapt the module's display according to the current users privileges.

Any help appreciated,

Chris
__________________
Dr Corbeille @ MamboSphere
drcorbeille is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 13.09.2004, 15:21   #2 (permalink)
Expert Mamber
 
mrjinx's Avatar
 
Join Date: Apr 2004
Location: Germany
Posts: 433
mrjinx is on a distinguished road
Default Re: Determine User's privileges

is this what you are searching for:

Code:
# Check for Editor rights
$is_editor = (strtolower($my->usertype) == 'editor' || strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'superadministrator' );
$is_user =  (strtolower($my->usertype) <> '');
$is_special = (strtolower($my->usertype) == 'editor' || strtolower($my->usertype) == 'author' || strtolower($my->usertype) == 'publisher');
$is_registered = (strtolower($my->usertype) == 'registered');
mrjinx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02.05.2005, 09:17   #3 (permalink)
Baby Mamber
 
Join Date: Apr 2005
Posts: 1
tangan is on a distinguished road
Default Re: Determine User's privileges

mrjinx,

Is this the code which is used to create/modify rights of the groups?

Pls tell us, what file does contain this code?

Thx,

Tangan
tangan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02.05.2005, 20:08   #4 (permalink)
Expert Mamber
 
mrjinx's Avatar
 
Join Date: Apr 2004
Location: Germany
Posts: 433
mrjinx is on a distinguished road
Default Re: Determine User's privileges

Quote:
Originally Posted by tangan
mrjinx,

Is this the code which is used to create/modify rights of the groups?

Pls tell us, what file does contain this code?

Thx,

Tangan
No it isn`t!
This piece of code is just a mamboroutine to check the rights of an already checked-in user.

I`m not able to tell you where you can find exactly the code you are searching for because I don`t understand whatfor you need it!
mrjinx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Users Component Under Development MamboJoe Component Development 50 21.04.2006 17:45
Can't view my users or settings!?!?!?????!!! oojacoboo Mambo 4.5 'How Do I' Questions 8 27.10.2005 18:48
How to determine the current users privileges drcorbeille Development Discussions 1 13.09.2004 04:02
Let users contact ALL users at once Kursk Mambo 4.5 'How Do I' Questions 8 23.08.2004 06:48
user's privileges andreadesign Mambo 4.5 General Talk 0 25.04.2004 23:10


All times are GMT +2. The time now is 08:08.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.