Magento News
Programmatically disabling Admin users
by farhan.munir (Posted Tue, 03 Jan 2012 11:19:28 GMT)
Hi Guys,
Due to customer requirements – i need to create a separate view/page where all user accounts will be listed and can be enabled/disabled
I have actually created such a functionality using following code:
- Code:
$user = Mage::getModel('admin/user')->loadByUsername($ecadmin);
$user->setData('is_active',$newvalue);
$user->save();
Where $new value can be 0/1 indicating the new status of account to be.
Account can be disabled successfully.
However I am having issues with enabling it – is_active is set correctly to 1 upon enable – however I couldn’t login to magento
Any ideas what I might be missing
Thanks in advance
http://magento-forum.co.uk/viewtopic.php?f=5&t=968#p3158
Possibly Related Posts:
- Hiring #Magento #Developers at #Ahmedabad location. http://t.co/O5PmfSqi #Magento #PHP #Mysql #Jobs #Ahmedabad
- わかってるよ………… あんたの「鉄球」はツェペリの一族のより上の技術があるんだろ? 安心してるよ
- Magento Upgrade by blugreen http://t.co/ZyH6G2MO #jobs #Freelance
- Looking for #Zend #Developers at #Ahmedabad location. http://t.co/O5PmfSqi #Magento #PHP #Mysql #Jobs #Ahmedabad
- Looking for #Zend #Developers at #Ahmedabad location. http://t.co/xDkodbp4 #Magento #PHP #Mysql #Jobs #Ahmedabad
RSS Feed