This topic is locked

Dynamic Permissions

2/24/2012 6:42:00 PM
PHPRunner General questions
S
stiven author

Hello Everyone,
i have a little problem that I have not been able to find a solution :/
$_SESSION["UserID"] = username field on the database since I am using this on many tables I didn't want to display the email address but instead i wanted to display the name of the user logged in, this also works on the display logged on as: I wanted to show the name instead of the username.
So i modified the login.php this line and change it to this
$_SESSION["UserID"] = $data['name'];
so now the $_SESSION["UserID"] displays the name which works fine. but on the admin area in the section assign users to groups the list of usernames is displaying the emails, I assign everyone to the admin group. but then when i logged in, the menu is blank. so i had to go and check the data in the ugmembers table and everyone was there with the -1 GroupID. so what i did is that i had to add manually the name and set it to GroupID -1.
I hope this makes sense.

Thanks

C
cgphp 2/24/2012

So i modified the login.php this line and change it to this


$_SESSION["UserID"] = $data['name'];


Why modifying the login.php file? You can directly put that code in the "AfterSuccessfulLogin" event.

S
stiven author 2/24/2012

ok i put it in the AfterSuccessfulLogin even but I still have the same problem.

C
cgphp 2/24/2012

Post a screenshot of your issue.

S
stiven author 2/24/2012

here is on the website


here is on the application phprunner..
username on both sides but on the page they are not the same..