- switch ($status)
- {
- case "CONFIRMED": // Yes, lock him down... ;-)
- define('__OK_VALUE' , "lock");
- define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), constant('__UID')));
- define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), constant('__UID')));
- break;
-
- case "LOCKED": // Unlock the user
- define('__OK_VALUE' , "unlock");
- define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), constant('__UID')));
- define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), constant('__UID')));
- break;
-
- case "UNCONFIRMED": // Unconfirmed accounts cannot be unlocked!
- define('__OK_VALUE' , "del");
- define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), constant('__UID')));
- define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), constant('__UID')));
- break;
+ switch (getUserData('status')) {
+ case 'CONFIRMED': // Yes, lock him down... ;-)
+ $content['ok'] = 'lock';
+ $content['header'] = '{%message,ADMIN_HEADER_LOCK_ACCOUNT=' . $content['userid'] . '%}';
+ $content['text'] = '{%message,ADMIN_TEXT_LOCK_ACCOUNT=' . $content['userid'] . '%}';
+ break;
+
+ case 'LOCKED': // Unlock the user
+ $content['ok'] = 'unlock';
+ $content['header'] = '{%message,ADMIN_HEADER_UNLOCK_ACCOUNT=' . $content['userid'] . '%}';
+ $content['text'] = '{%message,ADMIN_TEXT_UNLOCK_ACCOUNT=' . $content['userid'] . '%}';
+ break;
+
+ case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked!
+ $content['ok'] = 'delete';
+ $content['header'] = '{%message,ADMIN_HEADER_DELETE_ACCOUNT=' . $content['userid'] . '%}';
+ $content['text'] = '{%message,ADMIN_TEXT_DELETE_ACCOUNT=' . $content['userid'] . '%}';
+ break;