Jump to content

[getAdminToken] get error "Invalid security token", help please


vtwqcfchn
 Share

Recommended Posts

hi all

 

 I am adding a link (each row of grid) that point to a carrier. here is my folowling code:

 

$token_carriers = Tools::getAdminToken('AdminCarriers'.(int)Tab::getIdFromClassName('AdminCarriers').(int)Context::getContext()->employee->id);

 

$values= Db::getInstance()->ExecuteS($this->_query);
        
        foreach ($values as &$value)
        {                     
            $value['name'] ='<p><a href="index.php?controller=AdminCarrierWizard&token='.$token_carriers.'&id_carrier='.$value['id_carrier'].'">'.$this->l($value['name']).'</a></p>';            
        }

 

I have got an error 'Invalid security token' after click

 

any suggestion ?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More