Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2013 Stoyan Cheresharov, Niko Vasilev, Stoyan Revov and Svetoslav Chonkov
Copyright (C) 2013 Stoyan Cheresharov, Niko Vasilev, Stoyan Revov, Svetoslav Chonkov and Martin Briglia

Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ CsnUser requires setting up a Connection for Doctrine, a simple Mail configurati

5. Append the contents of `./vendor/coolcsn/CsnUser/data/CsnUser.css` to APP_ROOT/public/css/styles.css or include `CsnUser.css` into your app.

Default User
------------
CsnUser by default provides you with an admin user for you to test. Login with this user using `administrator` as the username and `superadmin` as the password.

Options
-------

Expand All @@ -78,14 +82,27 @@ The following options are available:
>### It is ready? ###
Navigate to *[hostname]/user* in your browser to view different options for login, registration, forgotten password, etc.

Enable module translations
--------------------------
If you wish to enable module translations, you need to add this array to `translation_file_patterns` key in your `translator` key in Zend Skeleton Application **Application** module config `module.config.php` file. After that, you may proceed to create your own translation files that are located in `CsnUser/language`

```
array(
'type' => 'gettext',
'base_dir' => __DIR__ . '/../../CsnUser/language',
'pattern' => '%s.mo',
'text_domain' => 'csnuser',
)
```

Routes
------------
The following routes are available:

- **user** Welcome view.
- **user/login** User login view.
- **user/register** User register view.
- **user/register/reset-password** User resep password view.
- **user/register/reset-password** User reset password view.
- **user/register/edit-profile** User edit profile view.
- **user/register/change-password** User change password view.
- **user/register/change-email** User change email view.
Expand All @@ -110,4 +127,7 @@ Recommends

- [coolcsn/CsnCms](https://github.com/coolcsn/CsnCms) - Content management system;

Known Issues
------------
- **ZendDeveloperTools:** Enabling *ZendDeveloperTools* module makes Doctrine ORM Annotation Builder fail. You can enable *ZendDeveloperTools*, but for annotated form creation test, you need to disable it first or annotated forms will not render at all.

5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"email": "st.revov@gmail.com",
"role": "Developer"
}
{
"name": "Martin Briglia",
"email": "martin@mgscreativa.com",
"role": "Developer"
}
],
"minimum-stability": "dev",
"require": {
Expand Down
37 changes: 33 additions & 4 deletions config/csnuser.global.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,42 @@ return array(
*
* Upon successful login the user will be redirected to the entered route
*
* Default value: 'user'
* Default value: 'user-index''
* Accepted values: A valid route name within your application
*
*/
'login_redirect_route' => 'user-index',

/**
* Login Redirect Route Options
*
* Options for the login redirect route
*
* Default value: empty array
* Accepted values: array of accepted route options
*/
'login_redirect_route_options' => array(),

/**
* Logout Redirect Route
*
* Upon logging out the user will be redirected to the enterd route
*
* Default value: 'user'
* Default value: 'user-index''
* Accepted values: A valid route name within your application
*/
'logout_redirect_route' => 'user-index',

/**
* Logout Redirect Route Options
*
* Options for the Logout Redirect Route
*
* Default value: empty array
* Accepted values: array of accepted route options
*/
'logout_redirect_route_options' => array(),

/**
* Sender email dadress
*
Expand Down Expand Up @@ -67,7 +87,16 @@ return array(
* Accepted values: int
*/
'captcha_char_num' => 3,


/**
* Set max idle user time in minutes, used to logout user in case of
* inactivity. Dont set it too high!
*
* Default value: 15
* Accepted values: int
*/
'session_life_time' => 15,

/**
* Visibility of exception details
*
Expand All @@ -79,4 +108,4 @@ return array(
*/
'display_exceptions' => true,
),
);
);
1 change: 1 addition & 0 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'service_manager' => array (
'factories' => array(
'Zend\Authentication\AuthenticationService' => 'CsnUser\Service\Factory\AuthenticationFactory',
'Zend\Session\SessionManager' => 'Zend\Session\Service\SessionManagerFactory',
'mail.transport' => 'CsnUser\Service\Factory\MailTransportFactory',
'csnuser_module_options' => 'CsnUser\Service\Factory\ModuleOptionsFactory',
'csnuser_error_view' => 'CsnUser\Service\Factory\ErrorViewFactory',
Expand Down
5 changes: 5 additions & 0 deletions data/CsnUser.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ table.users-list td,
table.users-list th {
text-align: center;
}

table.users-list td.name-column,
table.users-list td.email-column {
text-align: left;
}

table.users-list a.name {
color: #3389D1;
Expand Down
27 changes: 14 additions & 13 deletions data/SampleData.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,11 @@ INSERT INTO `language` (`id`, `name`, `abbreviation`) VALUES
-- Dumping data for table `role`
--

INSERT INTO `role` (`id`, `name`) VALUES
(1, 'Guest'),
(2, 'Member'),
(3, 'Admin');

--
-- Dumping data for table `roles_parents`
--

INSERT INTO `roles_parents` (`role_id`, `parent_id`) VALUES
(2, 1),
(3, 2);
INSERT INTO `role` (`id`, `name`, `description`) VALUES
(1, 'Guest', 'This is the not logged in user role, should not be applyed to any user.'),
(2, 'User', 'Should get almost view permissions only, and maybe some create/edit permissions'),
(3, 'Manager', 'Manages everithing except deletions'),
(4, 'Admin', 'The super user, he can do anything');

--
-- Dumping data for table `questions`
Expand All @@ -38,9 +31,17 @@ INSERT INTO `question` (`id`, `question`) VALUES
(4, 'In what city or town was your first job?');

--
-- Dumping data for table `questions`
-- Dumping data for table `state`
--

INSERT INTO `state` (`id`, `state`) VALUES
(1, 'Disabled'),
(2, 'Enabled');

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`id`, `role_id`, `language_id`, `state_id`, `question_id`, `username`, `first_name`, `last_name`, `email`, `password`, `answer`, `picture`, `registration_date`, `registration_token`, `email_confirmed`) VALUES
(1, 4, 1, 2, 3, 'administrator', 'Admin', 'Istrator', 'admin@istrator.com', '$2y$10$GUKeGz/rLU74nVN85c5OveH02Ymiq7gxxYoNbU6anwbjG/gzW2z8W', 'who knows', NULL, NULL, NULL, 1);

Binary file added language/en_US.mo
Binary file not shown.
Loading