It looks like you're new here. If you want to get involved, click one of these buttons!
Greetings to all.
I'm at my first steps with ElephantCMS and would like to add three types of users.
In this post
is described a requirement very similar to mine but I'm not able to put it into practice.
Any help will be appreciated.
Do you need special access control for each user type? If it's just a matter of showing different pages to the right groups, you can add the user types to apps/user/conf/config.php and you'll see them appear as options in the user add/edit forms as well as in the extra options in the page add/edit forms.
If you need something more than that, if you can describe it here I can try to recommend the best approach.
I added the user types as suggested and I can choose new types by adding or modifying users.
Now I should associate with each page/block the enabled user types but do not know how.
I would like to be able to allow access to multiple user types.
home - public
page 1 - allowed type: A
page 2 - allowed types: A,B
page 3 - allowed types: A,B,C
page 4 - allowed type: D
I had been meaning to fix the access control for a while, so I finally got to it with your message :) Basically, before you could only specify one user type for each access level, which was too limited.
If you clone the latest source from Github, you can now specify access levels like this:
1. In apps/user/conf/config.php add your user types to the user_types list:
user_types = "admin, member, group_a, group_b, group_c"
2. In the [Access] section of the same file, you can now specify multiple user types for an access level like this:
public = all
member = login
private = admin
group_a = group_a
group_a_and_b = group_a, group_b
shared = group_a, group_b, group_c
It helps to include "admin" in the lists so your admin account can access those pages too, for example:
shared = group_a, group_b, group_c, admin
From there, create users and assign them to the right user type, then under the Extra Options in the web page edit form, select the access level you want and it should work as you would expect it to.
Forgive my lack of knowledge.
What are the folders that I have to copy from Github to my existing installation?
I'm using 1.3.2 beta.
Here's the commit with these changes:
It's just the two files that were changed:
So if you grab those from Github that should do it.
I locked myself out and always get, username or password incorrect
You can run the following command on the command line to encrypt a new password for yourself:
./elefant encrypt-password 1234abcd
Note that you'll have to first cd into the root folder of your site for that to work. From there, you just have to connect to the database directly and run the following:
update elefant_user set password = "new password" where email = "email@example.com";
Just adjust the email and paste the output of the command into the "new password" string. If you're using SQLite as a database, you can run the following to connect to it:
For MySQL, that would be something like:
mysql -p -u USER -h HOST DBNAME
Hope that helps!
firstname.lastname@example.org:/web$ ./elefant encrypt-password 1234abcd
I get this error:
bash: ./elefant: /usr/bin/env: bad interpreter: No such file or directory
I'using Debian 6 jailed shell.
Accessing as root I can generate the new password.
I reset the password but I still cannot authenticate.
If I copy the original User.php I can log in.
What am I doing wrong?
My user table is named "user" not "elefant_user"; is this normal?
Thanks for everything.
I noticed that the new apps/user/models/User.php uses a # prefix # and I found that in my lib/DB.php the prefix is not managed.
Then I tried to copy the entire "lib" folder from Github to my root and now it works.
Probably I did something very crude, so please do not hesitate to scold me... perhaps explaining the correct way.
Thank you very much
Ah yes, the #prefix# change was added to a later release. You could try merging the changes from that commit into your existing apps/user/models/User.php file, and that ought to work fine from the look of it.
Another option you could try is to run the latest master release from Github, which has seen a lot of improvement since the last official release.
I've been waiting to put the next Elefant release out because we're mid-way into replacing the jWysiwyg editor with Redactor and we've been waiting for their new release as well that's supposed to support the level of integration we need. And it looks like their new release just came out in beta last night! :)
Starting from scratch with the latest master release all went well.
Is there any document that explains how to upgrade an entire site to the latest master release?
Aside from what's on the Administration page of the docs, if I'm running a site from the latest master on Github I usually just do a git pull origin master to fetch the latest changes to my own copy. If you're doing it that way though, it's good to have a development copy where you can pull the changes and test them before deploying them to a live site.
git pull origin master
In the future, we've added an ./elefant update command that will be used to fetch updates and apply them to a site, but that's actually new since the last official release as well.