ete Posted April 11, 2010 Share Posted April 11, 2010 I'm trying to develop a new tab where i want a link to a customer. I've peeked inside other admin tabs and the get the token as: Tools::getAdminToken('AdminCustomers'.intval(Tab::getIdFromClassName('AdminCustomers')).intval($cookie->id_employee)) but when i implement this in my link as per: $token = Tools::getAdminToken('AdminGroups'.intval(Tab::getIdFromClassName('AdminGroups')).intval($cookie->id_employee)); Client It gives me another token, who doesn't work. Is there something need to include in the beginning of the tab to get i working? Link to comment Share on other sites More sharing options...
codegrunt Posted April 14, 2010 Share Posted April 14, 2010 I am not sure what you are trying to achieve exactly but your code snippet uses the method Tools::getAdminToken() which looks like this: static public function getAdminToken($string) { return !empty($string) ? Tools::encrypt($string) : false; } So whatever you pass to that function is just returned encrypted in some manner so garbage in, garbage out. If you are not getting the token you want, you need to look at what the actual value of this concatenation is before you encrypt it: 'AdminGroups'.intval(Tab::getIdFromClassName('AdminGroups')).intval($cookie->id_employee); Try echoing that string first and that should show you whether the AdminGroups tab ID and employee ID are getting set correctly.Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now