#1 2016-02-05 12:54:40

terrylei
Member
Registered: 2014-10-05
Posts: 31

How to let user change password for their own account?

Is there a way to let user to change password for their own account? Currently if I enable the permission Settings > Users > Edit will allow them to modify other's as well.

Offline

#2 2016-02-06 15:00:36

otemu
Member
Registered: 2014-03-07
Posts: 183

Re: How to let user change password for their own account?

Hi,

I've looked doesn't look such option is available, seems you can modify all roles that are either the same level as you or lower.  To achieve such functionality your have to create you own separate profile edit within your site or maybe use an custom module within ionize admin, just be sure to disable the edit permissions so can only be changed by your custom module.

Speak to the Ionize team as a request, never know there may add it to the next release.

Hope that helps

Last edited by otemu (2016-02-06 15:01:38)

Offline

#3 2016-03-23 19:33:33

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: How to let user change password for their own account?

Hello,

Make a profile page from the documentation: http://doc.ionizecms.com/en/tutorials/u … in-profile
Then the users can change their profile data on the frontend. On the backend you have to add the fields with permission check to the ./themes/admin/views/user/user_no_edit.php

Best Regards,
Adamos42


Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

#4 2016-04-05 11:28:24

PGrafiek
Member
Registered: 2013-03-18
Posts: 24

Re: How to let user change password for their own account?

Hi,
There is no "User's profile edition" step in ionize tutorial...
Would you have an example ?
Thank you

Offline

#5 2016-04-05 11:38:35

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: How to let user change password for their own account?

Oh big_smile, It was in the foundation5 theme view files:

<!-- User not logged in -->
<ion:user:logged is="false">

	<!--
		PROFILE : Success message
	-->
	<ion:form:profile:validation:success is="true">
		<div class="alert-box success">
			<ion:lang key="form_alert_success_title" tag="h4" />
			<ion:form:profile:validation:success tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:profile:validation:success>


	<!--
		PROFILE : Error message
	-->
	<ion:form:profile:validation:error is="true">
		<div class="alert-box success">
			<ion:lang key="form_alert_error_title" tag="h4" />
			<ion:form:profile:validation:error tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:profile:validation:error>


	<!--
		LOGIN : Error message
	-->
	<ion:form:login:validation:error is="true" >
		<div class="alert-box alert">
			<ion:lang key="form_alert_error_title" tag="h4" />
			<ion:form:login:validation:error tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:login:validation:error>


	<!--
		PASSWORD BACK : Success message
	-->
	<ion:form:password:validation:success is="true">
		<div class="alert-box success">
			<ion:lang key="form_alert_success_title" tag="h4" />
			<ion:lang key="form_register_success_message" tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:password:validation:success>

	<!--
		PASSWORD BACK : Error message
	-->
	<ion:form:password:validation:error is="true" >
		<div class="alert-box alert">
			<ion:lang key="form_alert_error_title" tag="h4" />
			<ion:form:password:validation:error tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:password:validation:error>


	<!--
		REGISTRATION : Success message
		Displayed if the form was successfuly validated
	-->
	<ion:form:register:validation:success is="true">
		<div class="alert-box success">
			<ion:lang key="form_alert_success_title" tag="h4" />
			<ion:lang key="form_register_success_message" tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:register:validation:success>

	<!--
		REGISTRATION : Error message
		Displayed if the form doesn't pass the validation
		the 'form_message_error' key is located in : themes/your_theme/language/xx/tags_lang.php
	-->
	<ion:form:register:validation:error is="true" >
		<div class="alert-box alert">
			<ion:lang key="form_alert_error_title" tag="h4" />
			<ion:form:register:validation:error tag="p" />
			<a href="" class="close">&times;</a>
		</div>
	</ion:form:register:validation:error>

	<!-- REGISTRATION : form -->
	<form method="post" action="">
		<input type="hidden" name="form" value="register" />

		<label for="firstname-reg"><ion:lang key="form_label_firstname" /></label>
		<input type="text" id="firstname-reg" name="firstname" value="<ion:form:register:field:firstname />" />
		<ion:form:register:error:firstname tag="small" class="error" />

		<label for="lastname-reg"><ion:lang key="form_label_lastname" /></label>
		<input type="text" id="lastname-reg" name="lastname" value="<ion:form:register:field:lastname />" />
		<ion:form:register:error:lastname tag="small" class="error" />

		<label for="screen_name-reg"><ion:lang key="form_label_screen_name" /></label>
		<input type="text" id="screen_name-reg" name="screen_name" value="<ion:form:register:field:screen_name />" />
		<ion:form:register:error:screen_name tag="small" class="error" />

		<label for="email-reg"><ion:lang key="form_label_email" /></label>
		<input type="text" id="email-reg" name="email" value="<ion:form:register:field:email />"/>
		<ion:form:register:error:email tag="small" class="error" />

		<label for="password-reg"><ion:lang key="form_label_password" /></label>
		<input type="password" id="password-reg" name="password" value="<ion:form:register:field:password />"/>
		<ion:form:register:error:password tag="small" class="error" />

		<input type="submit" class="button submit success" value="<ion:lang key='form_button_register' />" />
	</form>


</ion:user:logged>

<!-- User logged in -->
<ion:user:logged is="true">

	<!-- Articles of this page with the type "logged-in" -->
	<ion:page:articles type="logged-in">
		<ion:article>
			<h3><ion:title /> <ion:user:name /></h3>
			<ion:content />
		</ion:article>
	</ion:page:articles>

	<!-- Profile form -->
	<form method="post" action="" class="custom">

		<input type="hidden" name="form" value="profile" />

		<label for="firstname-profile"  <ion:form:profile:error:firstname is='true' return=' class="error"' />>
			<ion:lang key="form_label_firstname" />
		</label>
		<input type="text" name="firstname" id="firstname-profile" value="<ion:user:form:profile:field:firstname />" />
		<ion:form:profile:error:firstname tag="small" class="error" />

		<label for="lastname-profile">
			<ion:lang key="form_label_lastname" />
		</label>
		<input type="text" name="lastname" id="lastname-profile" value="<ion:user:form:profile:field:lastname />"/>
		<ion:form:profile:error:lastname tag="small" class="error" />

		<label for="screen_name-profile">
			<ion:lang key="form_label_screen_name" />
		</label>
		<input type="text" id="screen_name-profile" name="screen_name" value="<ion:user:form:profile:field:screen_name />" />
		<ion:form:profile:error:screen_name tag="small" class="error" />
		<br/>

		<label for="email-profile" <ion:form:profile:error:email is='true' return=' class="error"' /> >
			<ion:lang key="form_label_email" />
		</label>
		<input type="text" name="email" id="email-profile" value="<ion:user:form:profile:field:email />" />
		<ion:form:profile:error:email tag="small" class="error" />

		<label for="birthdate-profile">
			<ion:lang key="form_label_birthdate" />
		</label>
		<p class="note"><ion:lang key="form_note_birthdate_format" /></p>
		<input type="text" name="birthdate" id="birthdate-profile"  value="<ion:user:form:profile:field:birthdate />"/>

		<!-- Radio boxes : Gender -->
		<label>
			<ion:lang key="form_label_gender" />
		</label>

		<ion:user:form:profile:field:gender />

		<label for="gender-profile-male">
			<input type="radio" name="gender" id="gender-profile-male" value="1" <ion:user:form:profile:radio:gender value="1" default="true" /> />
			<ion:lang key="form_label_gender_male" />
		</label>

		<label for="gender-profile-female" >
			<input type="radio" name="gender" id="gender-profile-female" value="2" <ion:user:form:profile:radio:gender value="2"  /> />
			<ion:lang key="form_label_gender_female" />
		</label>

		<label for="gender-profile-unisex" >
			<input type="radio" name="gender" id="gender-profile-unisex" value="3" class="clear left" <ion:user:form:profile:radio:gender value="3"  /> />
			<ion:lang key="form_label_gender_unisex" />
		</label>

		<ion:form:profile:error:gender tag="small" class="error" />
		<br/>

		<label for="password-profile">
			<ion:lang key="form_label_password" />
		</label>
		<p class="note"><ion:lang key="form_note_password_change" /></p>
		<input type="password" name="password" id="password-profile" />
		<ion:form:profile:error:password tag="small" class="error" />

		<label for="delete-profile">
			<input type="checkbox" name="delete" value="1" id="delete-profile" />
			<ion:lang key="form_label_delete_account" />
		</label>

		<br/>
		<input type="submit" class="button success" value="<ion:lang key='form_button_save_profile' />" />

	</form>
</ion:user:logged>

Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

#6 2016-04-05 12:05:02

PGrafiek
Member
Registered: 2013-03-18
Posts: 24

Re: How to let user change password for their own account?

Great,
Thank you !

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