<?php
if (isset($user)) {
if (!preg_match('/^([A-z0-9_-]+)$/ui', $user['nick']) && $_SERVER['PHP_SELF'] != '/user/info/edit.php') {
mysql_query("UPDATE `user` SET `set_nick` = '1' WHERE `id` = '$user[id]' LIMIT 1");
header('Location: /user/info/edit.php?set=nick');
exit;
}
}