Add configuration to allow an admin to set user default values.

This commit is contained in:
Andrew McMillan 2009-04-11 22:32:42 +12:00
parent 60a52972a6
commit a733f6d43a
2 changed files with 24 additions and 2 deletions

View File

@ -124,6 +124,18 @@ $c->collections_always_exist = false;
// $c->default_relationships = array(); // $c->default_relationships = array();
/**
* An array of fields on the usr record which should be set to specific
* values when the users are created.
* Default: none
*/
// $c->template_usr = array( 'active' => true,
// 'locale' => 'it_IT',
// 'date_format_type' => 'E',
// 'email_ok' => date('Y-m-d')
// );
/*************************************************************************** /***************************************************************************
* * * *
* External Authentication Sources * * External Authentication Sources *

View File

@ -9,7 +9,7 @@
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2 * @license http://gnu.org/copyleft/gpl.html GNU GPL v2
*/ */
require_once("User.php"); require("User.php");
require_once("classBrowser.php"); require_once("classBrowser.php");
require_once("auth-functions.php"); require_once("auth-functions.php");
@ -30,8 +30,14 @@ class RSCDSUser extends User
* Constructor - nothing fancy as yet. * Constructor - nothing fancy as yet.
*/ */
function RSCDSUser( $id , $prefix = "") { function RSCDSUser( $id , $prefix = "") {
global $c;
$this->delete_collection_confirmation_required = null; $this->delete_collection_confirmation_required = null;
parent::User( $id, $prefix ); parent::User( $id, $prefix );
if ( $this->user_no == 0 && isset($c->template_usr) && is_array($c->template_usr) ) {
foreach( $c->template_usr AS $k => $v ) {
$this->Set($k,$v);
}
}
} }
/** /**
@ -78,6 +84,8 @@ class RSCDSUser extends User
return $html; return $html;
} }
/** /**
* Render input file to import ics in calendar user * Render input file to import ics in calendar user
* *
@ -100,6 +108,7 @@ class RSCDSUser extends User
return $html; return $html;
} }
/** /**
* Render the user's relationships to other users & resources * Render the user's relationships to other users & resources
* *
@ -148,6 +157,7 @@ class RSCDSUser extends User
return $html; return $html;
} }
/** /**
* Render the user's relationships to other users & resources * Render the user's relationships to other users & resources
* *