2004-06-04 17:00:33
Importing Users 3 Questions
Hi Greg
1. I want my users to be named with a . between their first and last names. ie ... joe cools username will be joe.cool and his email will be joe.cool@mymailserver.com
Are there any issues with doing this in ATutor?
I've located and changed the following code in the username check part of importcourselist.php
stripslashes(strtolower($record['fname'].'.'.$record['lname']));
instead of stripslashes(strtolower($record['fname'].'_'.$record['lname']));
AND
if (!(eregi("^[a-zA-Z0-9_.]([a-zA-Z0-9_.])*$", $record['uname']))) {
$record['err_uname'] =
instead of
if (!(eregi("^[a-zA-Z0-9_]([a-zA-Z0-9_])*$", $record['uname']))) {
$record['err_uname'] =
====
2 Should a similar thing be done in the email check piece?
I am thinking specifically of changing:
else if (!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$"
to
else if (!eregi("^[a-z0-9\._.+@+[a-z0-9\._.]+\.+[a-z]{2,4}$"
=====
3. I can import one user fine by accessing the .txt file but no luck with two or more users. I'm thinking that perhaps the Mac is not providing the proper carrage return between rows (new users in the text file)
Sample text file:
hector, campbell, hector.campbell@mail.ednet.ns.ca
gail, coldwell, gail.coldwell@mail.ednet.ns.ca
I get the following error :
Incorrect file format on line 1.
thanks
larry