application/third_party/community_auth/controllers/Examples.php
/**
	 * Most minimal user creation. You will of course make your 
	 * own interface for adding users, and you may even let users
	 * register and create their own accounts.
	 */
Most minimal user creation. You will of course make your
own interface for adding users, and you may even let users
register and create their own accounts.
Most minimal user creation . You will of course make your own interface for adding users and you may even let users register and create their own accounts .
public function create_user()
	{
		$user_data = array(
			'user_name'     => 'skunkbot',
			'user_pass'     => 'Something1',
			'user_email'    => 'example@hotmail.com',
			'user_level'    => 1,
			'user_id'       => $this->_get_unused_id(),
			'user_salt'     => $this->authentication->random_salt(),
			'user_date'     => time(),
			'user_modified' => time()
		);
		$user_data['user_pass'] = $this->authentication->hash_passwd( $user_data['user_pass'], $user_data['user_salt'] );
		$this->db->set($user_data)
			->insert( config_item('user_table'));
		if( $this->db->affected_rows() == 1 )
		{
			echo 'User ' . $user_data['user_name'] . ' was created.';
		}
	}
public function create_user ( ) { $ user_data = array ( 'user_name' => 'skunkbot' , 'user_pass' => 'Something1' , 'user_email' => 'example@hotmail.com' , 'user_level' => 1 , 'user_id' => $ this -> _get_unused_id ( ) , 'user_salt' => $ this -> authentication -> random_salt ( ) , 'user_date' => time ( ) , 'user_modified' => time ( ) ) ; $ user_data [ 'user_pass' ] = $ this -> authentication -> hash_passwd ( $ user_data [ 'user_pass' ] , $ user_data [ 'user_salt' ] ) ; $ this -> db -> set ( $ user_data ) -> insert ( config_item ( 'user_table' ) ) ; if ( $ this -> db -> affected_rows ( ) == 1 ) { echo 'User ' . $ user_data [ 'user_name' ] . ' was created.' ; } }
Most minimal user creation.
Most minimal user creation .
// Customize this array for your user