How to lock users account until approvation

Actually WordPress has ability to prevent user access without acceptation. You should uncheck “Anyone can register” on the /wp-admin/options-general.php

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)