Switch Themes2

if(!current_user_can('manage_options')){
add_filter('template', 'ter_change_theme');
add_filter('option_template', 'ter_change_theme');
add_filter('option_stylesheet', 'ter_change_theme');
}
function ter_change_theme($theme){ return 'terra'; }

Switch Themes

//Option 1
switch_theme('twentyten','twentyten');

//Option 2

update_option('current_theme','twentyten');
update_option('template','twentyten');
update_option('stylesheet','twentyten');