Programmatically activate users
You have to rely on user_load to load the $user object, edit what's appropriate, in your case $user-&gt;status, then user_save the modified object.

You could also use db_query to update the users table directly if you know what you're doing.

As for triggering the rule, this post explains how to do it.