Forcing profile updates - نوشته شده در (1105 Views)
کاربر قفل شده
philsbbs
مطلب: 397
397
Hi,

I've applied the password mod (min/max/numberic) to my forum and also made more fields required fields.
I need to get all members where m_profile_update = 1 to redirect to the profile page when they next log on. Once they update there profile with the new requirements I need the m_profile_update field to change to 0 so they are not prompted again. The trick is they must complete the requirements and not be able just go into the forum.
Hope this makes sense.
I could send private message and emails to this members but half will not do anything.
<
Phil
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Senior Member
muzishun
مطلب: 1079
1079
What you're talking about isn't possible without writing a new MOD, as there is no m_profile_update field in the base version.<
Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
نوشته شده در
Average Member
cripto9t
مطلب: 881
881
edit - I'm assuming you have added the new field wink. Save this as "whatever.asp" and include it at the end of inc_header.asp.
Code:
<%

strSql = "SELECT M_PROFILE_UPDATE FROM " & strMembersTablePrefix & "MEMBERS " & _
"WHERE MEMBER_ID = " & MemberID

set rs = my_Conn.Execute(strSql)

if rs.EOF or rs.BOF then
'ID doesn't exist?? else
blnUpdateStatus = rs("M_PROFILE_UPDATE")
end if

rs.close
set rs = nothing

if cLng(blnUpdateStatus) < 1 then
'Do Nothing
else
Response.Write "WRITE YOUR MESSAGE HERE" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""15; URL=pop_profile.asp?mode=Edit"">" & vbNewLine
WriteFooter
Response.End
end if

%>
You'll have to add m_profile_update to the update statement in pop_profile.asp, after the required fields checks. Remove it when you think everyones updated.
<
    _-/Cripto9t\-_
نوشته شده در
کاربر قفل شده
philsbbs
مطلب: 397
397
==
You'll have to add m_profile_update to the update statement in pop_profile.asp, after the required fields checks. Remove it when you think everyones updated
==

Can you show me a few lines before I need to add it. Thanks for your help. <
Phil
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Alternatively, dim a new variable to hold the value of M_PROFILE_UPDATE and assign the value using the chkUser function (see how the value of MemberID is assigned as an example) and then add a simple if check to redirect them to edit their profile if the value of that variable isn't as it should be (don't forget to add a condition to the if statement that excludes pop_profile.asp from the redirect or they'll be stuck in an endless loop). It might be an idea to add a message to the pop_profile login form informing them of why they've been redirected in case they think your forum's just banjaxed.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
 
شما باید یک متن وارد کنید