[system] / trunk / webwork2 / lib / WeBWorK / DB.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/DB.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 6347 Revision 6348
1909 1909
1910################################################################################ 1910################################################################################
1911# utilities 1911# utilities
1912################################################################################ 1912################################################################################
1913 1913
1914sub check_user_id { # (valid characters are [-a-zA-Z0-9_.,]) 1914sub check_user_id { # (valid characters are [-a-zA-Z0-9_.,@])
1915 my $value = shift; 1915 my $value = shift;
1916 if ($value =~ m/^[-a-zA-Z0-9_.]*,?(set_id:)?[-a-zA-Z0-9_.]*(,g)?$/ ) { 1916 if ($value =~ m/^[-a-zA-Z0-9_.@]*,?(set_id:)?[-a-zA-Z0-9_.@]*(,g)?$/ ) {
1917 return 1; 1917 return 1;
1918 } else { 1918 } else {
1919 croak "invalid characters in user_id field: '$value' (valid characters are [-a-zA-Z0-9_.,])"; 1919 croak "invalid characters in user_id field: '$value' (valid characters are [-a-zA-Z0-9_.,@])";
1920 return 0; 1920 return 0;
1921 } 1921 }
1922} 1922}
1923# the (optional) second argument to checkKeyfields is to support versioned 1923# the (optional) second argument to checkKeyfields is to support versioned
1924# (gateway) sets, which may include commas in certain fields (in particular, 1924# (gateway) sets, which may include commas in certain fields (in particular,

Legend:
Removed from v.6347  
changed lines
  Added in v.6348

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9