return;\r
}\r
\r
+ \r
+ // check for username\r
+ $r = q("SELECT uid FROM user WHERE nickname='%s'", $account['user']['nickname']);\r
+ if ($r===false) {\r
+ logger("uimport:check nickname : ERROR : ".last_error(), LOGGER_NORMAL);\r
+ notice(t('Error! Cannot check nickname'));\r
+ return;\r
+ }\r
+ if (count($r)>0) {\r
+ notice(sprintf(t("User '%s' already exists on this server!"),$account['user']['nickname']));\r
+ return;\r
+ }\r
\r
$oldbaseurl = $account['baseurl'];\r
$newbaseurl = $a->get_baseurl();\r