Status message prompted twice I am opening my registration form in ctools modal popup. I have applied custom module to get that popup. 

Once user submit any form ajax window will be dismiss using  ctools_modal_command_dismiss().As window will be closed, status message will be printed using ajax_command_append('.ctools-use-modal',theme('status_messages').

But the status message get printed twice. I had tried to unset session messages. but it was not working.
The function drupal_set_message takes 3 parameters, message, type and repeat. Default repeat is TRUE. If you set it to FALSE, it will prevent duplicates.