21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 884 Views |
-
Member Profile?

5 September 2010 at 9:56am Last edited: 5 September 2010 10:24am
I am creating a website where a person uses their email and a password to log in. I am wondering how to create a page or some type of method where a person can cancel them self out?
-
Re: Member Profile?

5 September 2010 at 10:24am Last edited: 5 September 2010 10:24am
Moving post to general questions. Please put your question in the correct forum. As for how to do that are you using any existing profile module? a function to delete a member is pretty easy (you would want to add additional 'Do you want to do this' checks)
// Page_Controller
function deleteself() {
$member = Member::currentUser();
if($member) {
$member->delete();
$member->logOut();
}
}
return false;
}Then you just need a link to home/deleteself to allow the user to delete themselves.
-
Re: Member Profile?

6 September 2010 at 12:11am
I accidently clicked on the wrong selection in the forum area. My mouse is kind of sensitive. As far as a profile module. Yes I am using one. The information you have provided, I was wondering where to place the code to allow a user to delete themself from the site? I am sorry if I'm being specific. I am not really good with understanding website creation, but being here and learning about Silver Stripe helps, especially the forums section.
-
Re: Member Profile?

6 September 2010 at 11:33am
As far as a profile module. Yes I am using one...
Which one are you using?
I was wondering where to place the code to allow a user to delete themself from the site? I am sorry if I'm being specific. I am not really good with understanding website creation, but being here and learning about Silver Stripe helps, especially the forums section.
As I said you would put that specific code from my previous post in a controller, eg your Page controller. Then to make a link to that functionality put this in any of the template (.ss) files in your theme (eg themes/yourthemename/templates/Page.ss)
<a href="home/deleteself">Delete your Account</a>
-
Re: Member Profile?

8 September 2010 at 2:04pm
I will try it, because like I said, I'm sort of new to the placement of code to make things work. So far I been doing fine.
| 884 Views | ||
|
Page:
1
|
Go to Top |

