title: How to check whether a user is admin or not?
body: <pre><code>if(user_id != 'admin'){
      if(author === 'admin' || author === 'Admin' || author === 'ADMIN'){
          write_message = "You can't use admin NickName!";
          res.redirect('/write');
      }
  }
  else {
      conn.query(sql,[title,author,contents,user_id],function(err,rows,fields){
          if(err) console.log(err);
          else {
              res.redirect('/menu/'+before_page);
          }
      });
  }
  </code></pre>
  
  <p>Making users can't use admin 'author' but "if(user_id != 'admin')" here doesn't work.</p>
  
  <p>Keep going through first 'if(user_id != 'admin')' not 'else' even I login by admin id. How can I check if author is admin or not?</p>