#1 2010-11-19 14:42:02

Mario
Member
Registered: 2010-08-08
Posts: 86

Usermanager v0.3

Hey everyone,

Changelog
19.11.2010 - Usermanager v0.1
- Release

25.11.2010 - Usermanager v0.2
- Deleted all PHP from views
- Added a lot of new tags (see Tags)
- Fixed some bugs
- Added user profile compatibility (not only own profiles, but profiles of other users)
- Added more form validation functions
- Added a new special_field for users_model called "checkbox"

28.11.2010 - Usermanager v0.3
- Deleted most of the views (4 left)
- Removed some PHP processing from the libraries and put them into tags
- Added Picture support (multiple picture-predefinitions with differend thimb-sizes and default-pictures)
- Added E-Mail support (user receives an html-email after registration)
- Added more tag support

Introduction
I created a module for usermanagement as I needed a really scalable module in order to manage multiple types of users with different user fields and options. It's based on Ionize's core user functions and extends it for more options and multiple user-tables.

Caution
This module is in a beta phase. Use it at your own risks.
Also there is a Ionize core attempt to provide custom user fields. This is done by the users_meta table. At the moment, I use a different table for additional fields (even though you could theoretically use users_meta by using it in the config file instead of users_info). But I'm on it to completely merge it to users_meta, so it won't conflict with the ionize core. A plus is (after merging), the fields will be editable via admin interface.

Features
- Usermodel definition for all your needed custom fields
- Field-rules definition for different types of fields (required, restricted, min-length, user_id, password, default_value etc.)
since v0.1
- User registration
- Login
- Minilogin (Breadcrumb like)
- Profile / edit / delete
since v0.2
- Public profiles
- Using user fields in any files
since v0.3
- E-Mail support
- Picture upload
- Completely tag-based

ToDo
I will add the following features during development:
- Profiles editable by admins
- Admin interface in order to define the usermodel (which is currently defined in a config-file)

Screenshots
Minilogin, login:        http://250kb.de/u/101119/p/qqSuhSNQPHux.png
Minilogin, logged in: http://250kb.de/u/101119/p/JSxRDgaX6MOa.png
Registration:            http://250kb.de/u/101119/p/Gqhm5Hs7EM8b.png
Login:                      http://250kb.de/u/101119/p/lSf8FTKdXu2x.png
Profile:                     http://250kb.de/u/101119/p/6B4ipZ1ush8w.png
Profile edit:              http://250kb.de/u/101119/p/K8hlG1wJhbs5.png

Download
Usermanager v0.3 - http://www.synie.net/usermanager_v0-3.tar
Usermanager v0.2 - http://www.synie.net/usermanager_v0-2.tar
Usermanager v0.1 - http://www.synie.net/usermanager.tar

Installation
1. Download and unzip the usermanager.tar
2. Move it into /modules/
3. Edit /modules/Usermanager/config.xml
        - Edit the database structure to make it fit for your needs (it defines all the custom fields)
4. Edit /modules/Usermanager/config/config.php
        - Change the options to fit to your needs. Edit the Usermanager_usermodel to fit to the defined database fields
5. Log into your admin menu and install the module under Modules=>Administration

Usage
Now you can use predefined tags. I suggest the following:
1. Define 3 new page-views within your theme
     - login.php
     - register.php
     - profile.php
2. Activate them unter Adminmenu=>Configuration=>Themes
3. Edit those page-views and add the folowing tags to the place you want the module to appear:
     - <ion:usermanager request="register" /> (in register.php)
     - <ion:usermanager request="login" /> (in login.php)
     - <ion:usermanager request="profile" /> (in profile.php)
     - <ion:usermanager request="minilogin" /> (in every single view, you want the minilogin to appear (i've placed it within header.php, to make it visible everywhere))
4. Create pages (login, register, profile) and use the just defined views. I have made them invisble for the menu, so they don't appear in my main manu. The tag "minilogin" handles all the links to login/register/profile, etc. So you don't need them to appear in your menu.

Fixing one single Bug in Ion 0.95 rev7
Usermanager is written for 0.96. But for the current stable Version (0.95 rev7) you need to fix a little bug in the Ionize core.
Open /application/libraries/Connect.php and edit the following lines:

825                 $user_data['group_id'] = $this->model->set_group($this->pending_user_group);
...
829                 $user_data['group_id'] = $this->model->set_group($this->default_user_group);

to

825                 $user_data['id_group'] = $this->model->set_group($this->pending_user_group);
...
829                 $user_data['id_group'] = $this->model->set_group($this->default_user_group);

Done
Now you can use it. Navigate to
- www.yourdomain.com/en/login
- www.yourdomain.com/en/register
- www.yourdomain.com/en/profile
and test it out.
You can easily remove/modify/add the custom fields by changing Usermanager/config/config.php. To make them appear in your website, you also need to modify the specific template (most of the time it's Usermanager/views/tag_profile.php). But everything should be selfexplanatory.
You should also have a look for the templates in Usermanager/views/ in order to style them. They have very simple class names and id's. You only need to style them within your own theme-css-file. Here is an example CSS code:

.usermanager_minilogin .usermanager_input_text
{
    width: 70px;
    height: 12px;              
} 

.usermanager_minilogin .usermanager_input_password
{ 
    width: 70px;               
    height: 12px;              
} 

.usermanager_login             
{ 
    width: 350px;              
} 

.usermanager_login label       
{ 
    display: block;            
    width: 100px;
    float: left;
    text-align: right;         
    margin-right: 10px;        
} 

.usermanager_login p           
{ 
    height: 25px;              
    clear: both;               
} 

.usermanager_login .usermanager_input_text
{
    width: 153px;              
    height: 15px;              
}

.usermanager_login .usermanager_input_password
{ 
    width: 153px;              
    height: 15px;              
}   

.usermanager_register
{   
    width: 350px;
}   

.usermanager_register label    
{   
    display: block;            
    width: 100px;              
    float: left;               
    text-align: right;         
    margin-right: 10px;        
}

.usermanager_register p        
{
    height: 25px;
    clear: both;
}

.usermanager_register .usermanager_input_text
{
    width: 153px;
    height: 15px;
}

.usermanager_register .usermanager_input_password
{
    width: 153px;
    height: 15px;
}

.usermanager_register .usermanager_input_select
{
    width: 153px;
    height: 15px;
}

.usermanager_register .usermanager_label_checkbox
{
    display: inline;
    width: auto;
    float: none;
    text-align: left;
    margin-right: 0;
    margin-left: 3px;
}

.usermanager_profile
{
    width: 350px;
}

.usermanager_profile label
{
    display: block;
    width: 100px;
    float: left;
    text-align: right;
    margin-right: 10px;
}

.usermanager_profile p
{
    height: 25px;
    clear: both;
}

.usermanager_profile_edit
{
    width: 350px;
}

.usermanager_profile_edit label
{
    display: block;
    width: 100px;
    float: left;
    text-align: right;
    margin-right: 10px;
}

.usermanager_profile_edit p
{
    height: 25px;
    clear: both;
}

.usermanager_profile_edit .usermanager_input_text
{
    width: 153px;
    height: 15px;
}

.usermanager_profile_edit .usermanager_input_password
{
    width: 153px;
    height: 15px;
}

.usermanager_profile_edit .usermanager_input_select
{
    width: 153px;
    height: 15px;
}

.usermanager_profile_edit .usermanager_label_checkbox
{
    display: inline;
    width: auto;
    float: none;
    text-align: left;
    margin-right: 0;
    margin-left: 3px;
}

Tags
Here are some Tags, you can use everywhere!

/**
     * Returns the requested action
     *
     * @usage    <ion:usermanager [request="minilogin"] />     // Shows the minilogin view
     *
     *                                       "login"             // Shows the login view
     *
     *                                       "register"         // Shows the register view
     *
     *                                       "profile"         // Shows the profile view
     *
     *                                       "user"     [id_user="<int>"] [attr="is_editor"]         [is_like="<1/0>"] // Container-tag. If true, the inner html/tags will be shown
     *                                                    [id_user="<int>"] [attr="is_logged_in"]     [is_like="<1/0>"] // Container-tag. If true, the inner html/tags will be shown
     *                                                    [id_user="<int>"] [attr="get_picture"]         [field="<string>"]     [dimensions="<s/m/l/xl/../original>"] // Returns an URL to the picture of the field "field" with the specified dimension
     *                                                   [id_user="<int>"] [attr="id_user"]             [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="join_date"]         [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="last_visit"]         [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="username"]         [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="screen_name"]         [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="email"]             [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="id_group"]         [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                   [id_user="<int>"] [attr="<custom field>"]     [from_default_value="<1/0>"] [from_user_field="<1/0>"] [from_post_data="<form-name>"] [is_like="<string>"] [html_encode="<1/0>"]
     *                                                 // The user-request gives you lots of opportunities to retrieve user and form information
     *                                                 // id_user is the id of the user, you want to retreive information of. If it's not set, the current user is used.
     *                                                 // Besides attr="is_editor" (which is a cintainer-tag only), every attr="" is a user-field, which are defined under $config['usermanager_user_model'].
     *                                                 // If is_like isn't set ...
     *                                                 // - the tag will return the requested field given in attr="" (e.g. attr="screen_name", attr="username", ...).
     *                                                 // - from_default_value, from_user_field and from_post_data defines, where the data is taken from.
     *                                                 //   -> If from_default_data is "1", the requested field will be filled with the default data from the config file
     *                                                 //      - e.g. <ion:usermanager request="user"  attr="id_group" from_default_value="1" /> will return "4".
     *                                                 //   -> If from_user_field is "1", the requested field will be filled with the user information, that are in the database (if presend).
     *                                                 //      - e.g. <ion:usermanager request="user" attr="username" from_user_field="1" /> will return the saved username ("Mario" in my case).
     *                                                 //   -> If from_post_data is filled, the requested field will be filled with the information from $_POST-values.
     *                                                 //      - e.g. <ion:usermanager request="user" attr="email" from_post_data="login" /> will return the given email from the form "login".
     *                                                 //      - "login" in this case is the hidden field "form_name" in the specified forms.
     *                                                 // - if from_default_value, from_user_field and from_post_data are all set, they'll overwrite themselves in the very same order:
     *                                                 //   -> e.g. <ion:usermanager request="user" attr="email" from_default_value="1" from_user_field="1" from_post_data="profile_save" />
     *                                                 //      - The returned data will be constructed like this:
     *                                                 //        1. First it'll be filled with the default data (if given)
     *                                                 //        2. Then it'll be overridden by the user-field from the database (if given. If not given, default_value will be kept)
     *                                                 //           3. Then it'll be overridden by the post-data from the profile-form (if given. If not given, the previous filled data will be used.)
     *                                                 //      - You can use them in any combination. They'll only override if data is given. So you can set from_user_field and from_post_data in order
     *                                                 //        to display the user-fields if there is no post-data given (like for profile editing and other editing forms).
     *                                                 // If is_like is set
     *                                                 // - there will be no data returned. Then it's used as a container-tag.
     *                                                 // - from_default_value, from_user_field, from_post_data can be used anyway
     *                                                 // - e.g. <ion:usermanager request="user" attr="username" from_user_field="1" is_like="Foobar"><p>You've got a cool name!</p></ion:usermanager>
     *                                                 //   -> It'll display "<p>You've got a cool name!</p>" if the current user's username is "Foobar".
     *                                                 // - This is also useful for checkboxes, selects, radio buttons, etc
     *                                                 //   -> <input type="checkbox" name="newsletter" <ion:usermanager request='user' attr='newsletter' from_default_value="1"
     *                                                 //                     from_user_field='1' is_like='1'>CHECKED</ion:usermanager>>
     *                                              // If html_encode is 1 and is_like isn't set, the output will be run through htmlentities. html_encode is 1 by default.
     *
     *                                       "global"     [attr="admin_url"]                 // Returns an absolute URL to the admin interface
     *                                                    [attr="profile_url"]             // Returns an absolute URL to the current users profile
     *                                                    [attr="register_url"]             // Returns an absolute URL to the registration form
     *                                                    [attr="login_url"]                 // Returns an absolute URL to the login form
     *                                                    [attr="url"]                     // Returns an absolute URL to itself (used for forms, as they always point to the same page)
     *                                                    [attr="login_field_name"]         // Returns the login-field-name/-id. Either E-Mail or Username, depending on your config
     *                                                    [attr="login_field_label"]         // Returns the login-field-label Either E-Mail or Username, depending on your config
     *                                                    [attr="email_as_username"]         // Container-tag. Content will be shown if $config['email_as_username'] is true
     *                                                    [attr="not_email_as_username"]     // Container-tag. Content will be shown if $config['email_as_username'] is false
     *
     *                                       "form"     [attr="has_errors"] [form_name="<form_name>"] [is_like="<1/0>"]     // Container-tag. If true, the inner html/tags will be shown. If form_name is set, it'll only check for errors for the specified form.
     *                                                    [attr="error_string"]     // Returns an error string if has_errors is true
     *                                                   [attr="has_notices"] [form_name="<form_name>"] [is_like="<1/0>"]     // Container-tag. If true, the inner html/tags will be shown. If form_name is set, it'll only check for errors for the specified form.
     *                                                    [attr="notice_string"]     // Returns a notice string if has_notices is true
     *                                                   [attr="has_success"] [form_name="<form_name>"] [is_like="<1/0>"]     // Container-tag. If true, the inner html/tags will be shown. If form_name is set, it'll only check for errors for the specified form. Is true if data was saved.
     *                                                    [attr="success_string"]     // Returns a success string if has_success is true
     */

Enjoy!

Last edited by Mario (2010-11-28 05:18:09)

Offline

#2 2010-11-20 02:54:26

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Usermanager v0.3

Great Mario, I will check it.


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#3 2010-11-22 17:46:12

themhouse
Member
From: Bulgaria
Registered: 2010-05-12
Posts: 100
Website

Re: Usermanager v0.3

Great job Mario smile

P.S. I can find ??
4. Edit /modules/Usermanager/config/config.xml
In my config folder has config.php, routes.php and index.html
Where is the config.xml or you mean config.php?

Last edited by themhouse (2010-11-22 17:54:28)


Web and Graphic Design studio PONTODESIGN
Download Bulgarian Translation

Offline

#4 2010-11-22 18:59:47

Mario
Member
Registered: 2010-08-08
Posts: 86

Re: Usermanager v0.3

Oops, my fault. Of course I meant /modules/Usermanager/config/config.php. I'll change that in the original post. Thanks for the hint.

Offline

#5 2010-11-22 20:06:18

themhouse
Member
From: Bulgaria
Registered: 2010-05-12
Posts: 100
Website

Re: Usermanager v0.3

smile


Web and Graphic Design studio PONTODESIGN
Download Bulgarian Translation

Offline

#6 2010-11-23 22:18:00

Mario
Member
Registered: 2010-08-08
Posts: 86

Re: Usermanager v0.3

FYI

In the current version of Usermanager I push lots of data to the view files. That's why I don't parse them using FTL. Therefore you can't use <ion: >-tags in the views. In 0.96, parse_as_nested() will have a second argument, which can optionally contain an array with data, which will be forwarded to the file/string. So the 0.96 version of Usermanager will be much more extended than the current one.

To cut a long story short:
- In 0.95 you can't use <ion:>-tags in the Usermanager views.
- In the upcoming 0.96 you'll also be able to use <ion:>-tags

Mario

Offline

#7 2010-11-25 19:24:24

Mario
Member
Registered: 2010-08-08
Posts: 86

Re: Usermanager v0.3

So ...

I've just uploaded a major Update of Usermanager (v0.2).
All the PHP stuff have been removed from the view files, a lot of bux have been fixed and plenty of new tags have been added.

You can now:
Use User-Fields EVERYWHERE. Means you can create own (public) profile sites and use user fields in your entire website. Also some form processing and error handling tags have been added. You can easily track of every user related fields and input-data.

In the next release I'll focus on:
- File upload
- More tags
- Making the module more dynamic in order to use it with other modules or parts of Ionize

Oh, I almost forgot. Yes, v0.2 works with Ionize 0.95. I thought I wouldn't get it work due to the lack of PHP-processing in view files, but everything just works fine. It'll also be compatible to 0.96.

Regards,
Mario

Last edited by Mario (2010-11-25 19:26:20)

Offline

#8 2010-11-28 05:16:27

Mario
Member
Registered: 2010-08-08
Posts: 86

Re: Usermanager v0.3

And again ...

I've just uploaded Usermanager v0.3.

The main new features:
- Added Picture support (multiple picture-predefinitions with differend thimb-sizes and default-pictures)
- Added E-Mail support (user receives an html-email after registration)
- form tag got is_like support
- get-picture attribute of user tag
- is_logged_in attribute of user tag
- html_encode attribute of user_tag
- Added notice- and success-messages to the form-tag. It provides more functionality of displaying messages

I've removed almost all views. Due to the new tags and error-, notice- and success-messages it's all compressed into less files. The profile overview is missing completely, as everyone should design their own provile overview (just use usermanager-tags in an ordinary article/page-view (the current usermanager-views are the best example)).

Please don't use those tags anymore:
<ion:usermanager request="login" />
<ion:usermanager request="register" />
<ion:usermanager request="profile" />

There is no PHP-logic behind them anymore. Everything they process is done by tags. Look at the the views tag_register.php, tag_login.php and tag_profile.php. They're returned by invoking the mentioned tags. Just copy them to your own views and modify them. Except for minilogin, there are no pre-defined views needed anymore.

In v0.2 it was only possible to edit data by using the profile form. But this requested all fields to be filled. Now you can change just some or only a single field by using the "random_fields_form"-form. There's an example in tag_profile.php. It's used to change the field "company_profile".
Required fields aren't handled as required (like for registration or profile edition). If there is data present, it will be changed (after validation of course). Restriction and every other rules are still intact. Only the "required"-rule is ignored.

At this stage of the module, you'll be able to completely build your own user-management. I've created a very complex user-base with multiple user-types for a customer with this module.

That's it. Have fun ;-)

Regards,
Mario

Last edited by Mario (2010-11-28 05:23:41)

Offline

#9 2010-12-16 11:26:48

sutar
Member
Registered: 2010-12-16
Posts: 1

Re: Usermanager v0.3

Hi Mario,
I really like the Usermanager module.
When I tried to install it in my website using ionize, I got some problems on REGISTER.
well.. I just setup as you mentioned in this page.
I got an error when I try to register, system showed that

Oops, something went wrong
We was not able to save your data into our system, please try again or contact us.

I don't know where went wrong, so can you help me out?

Thanks Mario!!

looking forward to your reply  : )

Last edited by sutar (2010-12-16 11:27:20)

Offline

#10 2010-12-20 14:14:44

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: Usermanager v0.3

Mario,

OK for not using these tags anymore :
<ion:usermanager request="login" />
<ion:usermanager request="register" />
<ion:usermanager request="profile" />

But will further version have the default views ?

Default views can be nice for users because they are example to follow.


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#11 2010-12-20 15:02:48

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: Usermanager v0.3

@sutar :

The problem comes from a bug in the Connect() lib. This bug is corrected in the 0.9.6.

You need to change some things in the file /application/libraries/Connect.php :

Line 825, replace :

    $user_data['group_id'] = $this->model->set_group($this->pending_user_group);

by :

    $user_data['id_group'] = $this->model->set_group($this->pending_user_group);

Line 829, replace : 

    $user_data['group_id'] = $this->model->set_group($this->default_user_group);

by :

    $user_data['id_group'] = $this->model->set_group($this->default_user_group);

You need also to change a little detail in /application/models/connect_model.php :

Line 172, replace : 

    $query->select('group_id')

by :

    $query->select('id_group')

Line 176, replace :

    return $this->db->update($this->users_table, array('group_id' => $query), array('user_id' => $user_id), 1);

by :

    return $this->db->update($this->users_table, array('id_group' => $query), array('user_id' => $user_id), 1);

Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#12 2010-12-20 15:04:22

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: Usermanager v0.3

These things will be corrected in the 0.9.6 version !


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#13 2011-01-11 14:15:40

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Usermanager v0.3

in language file :

$lang['module_usermanager_email_registration_text2'] = 		". Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";
$lang['module_usermanager_email_registration_text4'] = 		"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";

what is theese where we need thsese?


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#14 2011-01-11 15:15:48

Kink
Ion Tester
From: France
Registered: 2010-06-04
Posts: 581

Re: Usermanager v0.3

It seems to be dummy text, for developer test only ?!?


Webmaster / OUF!WEB

Offline

#15 2011-09-08 13:38:11

onur
Member
Registered: 2011-03-03
Posts: 41

Re: Usermanager v0.3

Is this module working on 0.97? Seems it's not finished yet.

Offline

#16 2011-09-09 09:59:41

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Usermanager v0.3

0.9.7 included usermanager module!

You can use it!


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#17 2011-09-11 14:12:05

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: Usermanager v0.3

Mario, who developed this module, do not contribute any more to the project.

This module has been integrated to the free modules provided in Ionize, and the team will support it for all the future version of Ionize.

Like Ionize, it needs to be much better documented.


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#18 2011-09-22 16:32:44

thedoglett
Member
Registered: 2011-07-15
Posts: 128

Re: Usermanager v0.3

A quick question - those users who are known as 'guests' and 'users' when they log in go straight to the admin login screen (which they can't access because they don't have the privileges) - is there any way to forward them to the home page instead?

I've checked the config.php but can't see any indication of how to do this - can anyone help?

Offline

#19 2011-09-22 18:15:47

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Usermanager v0.3

User manager have based login panel view check it you can use it!

And if you want redirect to user after login, you can add " redirect(base_url());" on line 83 in "usermanager_action.php".

/*
         * LOGIN
         */
        if (($ci->input->post('form_name') === "minilogin") || ($ci->input->post('form_name') === "login"))
        {
            if (!$ci->connect->logged_in())
            {
                $tmp_form_name = $_POST['form_name'];
                unset($_POST['submit']);
                unset($_POST['submit_form']);
                unset($_POST['form_name']);
                if($ci->usermanager_functions->check_login_input())
                {
                    if ($ci->connect->login($_POST))
                    {
                        $_POST['form_name'] = $tmp_form_name;
                        $ci->usermanager_functions->additional_success['login'] = lang("module_usermanager_text_logged_in");
                        redirect(base_url()); // you can add redirect function here
                    }
                    else
                    {
                        $_POST['form_name'] = $tmp_form_name;
                        $ci->usermanager_functions->additional_err['login'] = lang("module_usermanager_error_bad_login_information");
                    }
                }
                else
                {
                    $_POST['form_name'] = $tmp_form_name;
                }
            }
        }

<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#20 2011-09-22 19:14:52

thedoglett
Member
Registered: 2011-07-15
Posts: 128

Re: Usermanager v0.3

Offline

#21 2011-09-28 22:37:48

cresQ
Member
Registered: 2011-09-28
Posts: 1

Re: Usermanager v0.3

Hi everyone,

Yesterday I instaled ionize and today I enabled the user module. Everything goes fine until I try the register form!
I fill in every field, but I always receive the error "Javascript must be activated to send this form !".
Javascript is enabled in the browser and I realy don't find the solution. Can anyone help me?

Offline

#22 2011-10-31 00:12:39

vasek
Member
Registered: 2011-10-31
Posts: 1

Re: Usermanager v0.3

cresQ wrote:

Hi everyone,

Yesterday I instaled ionize and today I enabled the user module. Everything goes fine until I try the register form!
I fill in every field, but I always receive the error "Javascript must be activated to send this form !".
Javascript is enabled in the browser and I realy don't find the solution. Can anyone help me?

Hi,
I had the same problem. After some digging, I found it's caused by missing antispam defined to form field "ck", which is not included by the way smile
Here is my solution (not the best, but works for my testing purpose). Add this lines to the form:

        <input type="hidden" name="ck" value="register" id="ck"/>
            <script type="text/javascript">
        /* jQuery code
        jQuery(document).ready(function($)
        {
            $('#ck').val('<ion:config item="form_antispam_key" />');
        });
        */

        // Mootools code
        window.addEvent('load', function() //using load instead of domready for IE8
        { 
            $('ck').value = '<ion:config item="form_antispam_key" />';
        });
    </script>

I found Ionize few days ago and I somehow like it more and more smile Keep on development! wink

Offline

#23 2012-02-01 09:55:35

shinichi
Member
Registered: 2012-02-01
Posts: 1

Re: Usermanager v0.3

hi...all
how to create link/url for user logout?

thank's big_smile

Offline

#24 2012-02-29 21:55:03

kojiroh
Member
Registered: 2011-09-06
Posts: 74
Website

Re: Usermanager v0.3

Does the activation routine work? If it does, how can we get it to work, and how can we tell if a user is activated or not (everyone can login right now, even if their accounts are not activated).

On the module's tagmanager file, on line 13, it says;

"activate"         // Shows the activation view and activates one account

But on line 90 there's a switch..case block which decides what to do, but it doesn't have a case for "activate".

And on usermanager_action.php library, there's a code block (on line 307) which I think does the actual activation of the user; but it seems to be using uri segments, and as far as I know, uri segments do not work at all, since trying to add a uri segment after an article name only leads to 404 not found error.

Offline

#25 2012-04-03 13:51:50

gnadirap
Member
From: CH-Ramsen
Registered: 2012-03-27
Posts: 33
Website

Re: Usermanager v0.3

As it seams in 0.9.7 the Activation is not programmed yet...

So, if the account is generated / created, it will be activated from beginning...

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations