My syntax was wrong for the command name part. I finally figured it out and then was able to get selected value from the gridview using DataKeys and was then able to send this value to unlock user account.
protected void gridview_search_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName.CompareTo("unlock_account") == 0)
{
int user = (int)gridview_search.DataKeys[Convert.ToInt32(e.CommandArgument)].Value;
//unlock account method
userObj.unlockAccount(user);
}
}